immutable-array.every
provides a function that returns true if predicate returns true
for all items of immutable array and false
if not.
$ npm install immutable-array.every --save
const ImmutableArray = {
of: require('immutable-array.of'),
every: require('immutable-array.every')
}
const array = ImmutableArray.of([1, 2, 3, 4, 5]) // {array: [1, 2, 3, 4, 5], length: 5}
ImmutableArray.every(e => e <= 3, array) // false
ImmutableArray.every(e => e >= 1, array) // true
- Node.js >=6
- ES2015 transpilers
MIT