Home Manual Reference Source

:cherries: @collection-abstraction/pairs

Pairs set for JavaScript. See docs.

:warning: The code requires regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {EfficientlyInvertiblePairs as Pairs} from '@collection-abstraction/pairs';
const pairs = Pairs.from(['ab', [1,2], [1,3]]);
pairs.left(); // a 1
pairs.right(); // b 2 3
pairs.invert().right(); // a 1
pairs.leftOf(3); // 1
pairs.rightOf(1); // 2 3
pairs.has([1, 2]); // true
pairs.add('bc');
...

License Version Tests Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size