Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/litichevskiydv/collectio-hashset

Implementation of Set with a configurable equality algorithm
https://github.com/litichevskiydv/collectio-hashset

Last synced: 23 days ago
JSON representation

Implementation of Set with a configurable equality algorithm

Awesome Lists containing this project

README

        

# collectio-hashset

[![npm version](https://badge.fury.io/js/collectio-hashset.svg)](https://www.npmjs.com/package/collectio-hashset)
[![npm downloads](https://img.shields.io/npm/dt/collectio-hashset.svg)](https://www.npmjs.com/package/collectio-hashset)
[![dependencies status](https://img.shields.io/librariesio/github/litichevskiydv/collectio-hashset)](https://www.npmjs.com/package/collectio-hashset)
[![Build Status](https://github.com/litichevskiydv/collectio-hashset/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/litichevskiydv/collectio-hashset/actions/workflows/ci.yaml)
[![Coverage Status](https://coveralls.io/repos/github/litichevskiydv/collectio-hashset/badge.svg?branch=master)](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) : number
- [`add(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/add) : [HashSet](https://github.com/litichevskiydv/collectio-hashset/wiki/HashSet)
- [`has(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/has) : boolean
- [`delete(value)`](https://github.com/litichevskiydv/collectio-hashset/wiki/delete) : boolean
- [`clear()`](https://github.com/litichevskiydv/collectio-hashset/wiki/clear) : undefined
- [`forEach(callback)`](https://github.com/litichevskiydv/collectio-hashset/wiki/forEach) : undefined
- [`entries()`](https://github.com/litichevskiydv/collectio-hashset/wiki/entries) : Iterable.<[any, any]>
- [`values()`](https://github.com/litichevskiydv/collectio-hashset/wiki/values) : Iterable.<any>
- [`[Symbol.iterator]()`](https://github.com/litichevskiydv/collectio-hashset/wiki/Symbol.iterator) : Iterable.<any>