Share your code. Components are building blocks, you are the architect.

utils/index-of
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
Returns the position of the first occurrence of an item in an array, or -1

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/index-of in your project
npm i @bit/bit.ramda.utils.index-of
Copied

indexOf (target:*, xs:Array) : Number

Returns the position of the first occurrence of an item in an array, or -1 if the item is not included in the array. R.equals is used to determine equality.

Example

R.indexOf(3, [1,2,3,4]); //=> 2
     R.indexOf(10, [1,2,3,4]); //=> -1

Arguments

target: *

The item to find.

xs: Array

The array to search in.

Returns

Number

the index of the target, or -1 if the target is not found.