Skip to content

xgbuils/immutable-array.push

Repository files navigation

immutable-array.push

travis ci npm version Coverage Status Dependency Status

immutable-array.push provides a function that returns the concatenation of an immutable array with an item.

Install

$ npm install immutable-array.push --save

Usage

const ImmutableArray = {
    of: require('immutable-array.of'),
    push: require('immutable-array.push')
}

const a = ImmutableArray.of([1, 2, 3, 4, 5]) // {array: [1, 2, 3, 4, 5], length: 5}
const b = ImmutableArray.push(6, a) // {array: [1, 2, 3, 4, 5, 6], length: 6}
a // {array: [1, 2, 3, 4, 5, 6], length: 5}

Other related libraries

Support

  • Node.js >=6
  • ES2015 transpilers

License

MIT

About

provides a function that returns the concatenation of an immutable array with an item.

Resources

Stars

Watchers

Forks

Packages

No packages published