1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getFirstArrayDuplicate = void 0;
|
4 | function getFirstArrayDuplicate(array) {
|
5 | const seenValues = new Set();
|
6 | for (const entry of array) {
|
7 | if (seenValues.has(entry)) {
|
8 | return entry;
|
9 | }
|
10 | else {
|
11 | seenValues.add(entry);
|
12 | }
|
13 | }
|
14 | return undefined;
|
15 | }
|
16 | exports.getFirstArrayDuplicate = getFirstArrayDuplicate;
|
17 | //# sourceMappingURL=js.js.map |
\ | No newline at end of file |