find-last
v1.0.0
Published
Like Array#find but searches the array backwards.
Downloads
4
Readme
find-last
Like Array#find but searches the array backwards.
Install
npm install find-last
Usage
const findLast = require("find-last");
findLast(["a", "b", "bba", "cc", "d"], value => value.includes("a"));
//=> "bba"
API
findLast(array, predicate)
array
Type: array
The array to search.
predicate
Type: (item, index, array) => boolean
The predicate function to call on each item.