array-inmutable
v0.1.2
Published
wrapped array structure which provides inmutable high performance methods
Downloads
2
Readme
array-inmutable
array-inmutable
exports a class that builds iterables that provide slice method.
Install
$ npm install array-inmutable --save
Usage
const ArrayInmutable = require('array-inmutable')
const a = ArrayInmutable([1]) // (2)
.push(2) // (1, 2)
const b = a.push(5)
a.every(e => e < 3) // true
b.every(e => e < 3) // false
a.reduce((x, y) => x * y, 1) // 2 (1 * 2)
a.reduce((x, y) => x * y, 1) // 10 (1 * 2 * 5)
Support
- Node.js >=6
- ES2015 transpilers
License
MIT