UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

20 lines 461 B
/** * Finds duplicates in a list of strings * * @param strings List of strings * @returns List of duplicates */ export function findDuplicates(strings) { const stringSet = new Set(); const duplicates = []; for (const str of strings) { if (stringSet.has(str)) { duplicates.push(str); } else { stringSet.add(str); } } return duplicates; } //# sourceMappingURL=find-duplicates.js.map