immutable-array.find-index-from

0.1.0 • Public • Published

immutable-array.findIndexFrom

travis ci npm version Coverage Status Dependency Status

immutable-array.findIndexFrom returns the index of the first item that matches with a predicate starting from some index. If any item doesn't match, then returns -1.

Install

$ npm install immutable-array.findIndexFrom --save

Usage

const ImmutableArray = {
    of: require('immutable-array.of'),
    findIndexFrom: require('immutable-array.findIndexFrom')
}
 
const array = ImmutableArray.of([5, 2, 3, 4, 5]) // {array: [1, 2, 3, 4, 5], length: 5}
ImmutableArray.findIndexFrom(0, e => e === 5, array) // 0
ImmutableArray.findIndexFrom(1, e => e === 5, array) // 4

Other related libraries

Support

  • Node.js >=6
  • ES2015 transpilers

License

MIT

Package Sidebar

Install

npm i immutable-array.find-index-from

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

6.35 kB

Total Files

4

Last publish

Collaborators

  • xgbuils