0.1.0 • Published 6 years ago

immutable-array.find-index-from v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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