UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

14 lines (11 loc) 218 B
export function findLast(predicate) { return list => { let index = list.length while (--index >= 0) { if (predicate(list[index])) { return list[index] } } return undefined } }