1.0.3 • Published 4 years ago
array-test-npm-arraylib v1.0.3
A functional library for working with arrays.
Usage
Import one of these implementations:
- arrayLibES5 object contains functions which is written with ES5 syntax;
- arratLibRS6 object contains functions which is written with ES6 syntax;
- arrayLib2 object contains functions which is written with ES5 syntax.
Functionality (arrayLib):
- take(arr,n) - lodash;
- skip(arr, n) - lodash;
- map(arr, cb) - lodash;
- reduce(arr, cb, init) - lodash;
- filter(arr, cb) - lodash;
- foreach(arr, cb) - lodash.
Functionality (arrayLib2):
- sort(bubble, insertion);
- min(arr);
- max(arr);
- avg(arr);
- getMaxSubSum(arr).
Tested with Jest.
Added es6 version.