UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

14 lines (11 loc) 196 B
export function findLastIndex(fn) { return list => { let index = list.length while (--index >= 0) { if (fn(list[index])) { return index } } return -1 } }