1.0.1 • Published 4 years ago
@jswork/next-collection v1.0.1
next-collection
Collection for next.
installation
npm install -S @jswork/next-collectionapis
| api | params | description |
|---|---|---|
| union | - | Union collection. |
| intersect | - | Collection intersection. |
| diff | - | Collection difference. |
| minus | - | Collection except other(minus). |
usage
import NxCollection from '@jswork/next-collection';
const arr1 = [1, 2, 3]
const arr2 = [1, 5, 2, 6]
const col1 = nx.Collection.minus(arr1, arr2);
const col2 = nx.Collection.minus(arr2, arr1);
// result:
// [3]
// [5, 6]license
Code released under the MIT license.
1.0.1
4 years ago