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

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

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/last-index-of in your project
npm i @bit/bit.ramda.utils.last-index-of
Copied

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

Returns the position of the last 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.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6
     R.lastIndexOf(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.