UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

16 lines (13 loc) 232 B
export function find(predicate) { return list => { let index = 0 const len = list.length while (index < len) { const x = list[index] if (predicate(x)) { return x } index++ } } }