0.1.2 • Published 6 years ago

array-inmutable v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

array-inmutable

travis ci npm version Coverage Status Dependency Status

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