@suns-echoes/array-utils
v1.1.0
Published
Array Utilities Library
Downloads
1
Readme
Array Utilities
array-utils
library add new methods for array manipulation.
Installation
npm i @suns-echoes/array-utils
Import
as Node.js module (CJS)
// Import full library minimized distribution file:
import ArrayUtils from '@suns-echoes/array-utils';
// Import library from source:
import ArrayUtils from '@suns-echoes/array-utils/cjs';
// or named:
import { ArrayUtils } from '@suns-echoes/array-utils/cjs/array-utils';
// Import single util:
import { diff } from '@suns-echoes/array-utils/cjs/utils/diff';
as ES6 module (ESM)
// Import library from source:
import ArrayUtils from '@suns-echoes/array-utils/esm/index.js';
// or named:
import { ArrayUtils } from '@suns-echoes/array-utils/esm/array-utils.js';
// Import single util:
import { diff } from '@suns-echoes/array-utils/esm/utils/diff.js';
Methods
- amoeba-sort - sort array in amoeba grow style
- diff - find differences between arrays
- difference - get items unique to first input array
- exclusive - get non-intersecting items from input arrays
- intersect - get items common to all input arrays
- union - get unique items from input arrays
License
Licensed under MIT
Copyright (c) 2021 Aneta Suns