@justinc/extract-duplicates

1.0.0 • Public • Published

Install

npm i @justinc/extract-duplicates

extractDuplicates(iterable) ⇒ Set.<*>

Extracts duplicates from given iterable. Returns a Set of the found duplicates. When deciding whether an element is a duplicate, the native Set's equality is used (for performance reasons). This is value equality.

Kind: global function

Param Type
iterable Iterable.<*>

Example

const extractDuplicates = require('@justinc/extract-duplicates')
extractDuplicates([1,2,1,1,2,3])
// Set { 1, 2 }

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.05latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.05

Package Sidebar

Install

npm i @justinc/extract-duplicates

Weekly Downloads

5

Version

1.0.0

License

ISC

Last publish

Collaborators

  • justinc