Immutable Set
An persistent set data structure, backed by an immutable hash map
This documentation is under construction. The list of functions, descriptions and examples are pending.
Installation
npm install @collectable/set
yarn add @collectable/set
If you intend to use other data structures as well, install the main collectable package instead. It takes a dependency on each of these data structures, and so they will become available implicitly, after installation.
npm install collectable
yarn add collectable
TypeScript type definitions are built in.
Usage
Import and use the functions you need:
import { fromArray, toArray } from '@collectable/set';
const set = fromArray(['X', 'Y']);
const array = toArray(set);
Use a modern bundler such as Webpack 2 or Rollup in order to take advantage of tree shaking capabilities, giving you maximum flexibility to use what you need while excluding anything else from the final build.
Documentation pending