immutable-array.push
v0.1.0
Published
given an immutable array and item it returns a new immutable array that represents the concatenation of immutable array and the item
Downloads
4
Readme
immutable-array.push
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