collectio-hashset
Version:
Implementation of Set with a configurable equality algorithm
29 lines (22 loc) • 2.22 kB
Markdown
# collectio-hashset
[](https://www.npmjs.com/package/collectio-hashset)
[](https://www.npmjs.com/package/collectio-hashset)
[](https://www.npmjs.com/package/collectio-hashset)
[](https://github.com/litichevskiydv/collectio-hashset/actions/workflows/ci.yaml)
[](https://coveralls.io/github/litichevskiydv/collectio-hashset?branch=master)
# Install
`npm i collectio-hashset`
# Description
Implementation of Set with a configurable equality algorithm
- [`HashSet`](https://github.com/litichevskiydv/collectio-hashset/wiki/HashSet)
- [`new HashSet(equalityComparer)`](https://github.com/litichevskiydv/collectio-hashset/wiki/constructor)
- _instance_
- [`size`](https://github.com/litichevskiydv/collectio-hashset/wiki/size) : <code>number</code>
- [`add(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/add) : [<code>HashSet</code>](https://github.com/litichevskiydv/collectio-hashset/wiki/HashSet)
- [`has(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/has) : <code>boolean</code>
- [`delete(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/delete) : <code>boolean</code>
- [`clear()`](https://github.com/litichevskiydv/collectio-hashset/wiki/clear) : <code>undefined</code>
- [`forEach(callback)`](https://github.com/litichevskiydv/collectio-hashset/wiki/forEach) : <code>undefined</code>
- [`entries()`](https://github.com/litichevskiydv/collectio-hashset/wiki/entries) : <code>Iterable.<[any, any]></code>
- [`values()`](https://github.com/litichevskiydv/collectio-hashset/wiki/values) : <code>Iterable.<any></code>
- [`[Symbol.iterator]()`](https://github.com/litichevskiydv/collectio-hashset/wiki/Symbol.iterator) : <code>Iterable.<any></code>