non-empty-set
v0.0.1
Published
Statically typed non empty Set
Readme
non-empty-set
Statically typed countable es6 Set instances
Install
npm install --save non-empty-setor using yarn
yarn add non-empty-setAPI
Types
NonEmptySet<T>:Set<T>EmptySet<T>:Set<T>FiniteSet<T>:EmptySet<T> | NonEmptySet<T>
Create
function emptySet<T>(): EmptySet<T>function nonEmptySet<T>(value: T): NonEmptySet<T>function fromSet<T>(set: Set<T>): FiniteSet<T>function fromIterable<T>(iterable: Iterable<T>): FiniteSet<T>
Change
function add<T>(values: Iterable<T>, set: Set<T>): FiniteSet<T>function remove<T>(values: Iterable<T>, set: Set<T>): FiniteSet<T>
Validate
function isEmpty<T>(set: FiniteSet<T>): booleanfunction isNotEmpty<T>(set: FiniteSet<T>): boolean
