array-inmutable

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i array-inmutable

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • xgbuils