UNPKG

@extra-array/find-index

Version:

Finds index of leftmost value passing a test.

12 lines 341 B
import { search as iterableSearch } from 'extra-iterable'; /** * Finds index of leftmost value passing a test. * @param x an array * @param ft test function (v, i, x) * @returns index of value, -1 if not found */ function findIndex(x, ft) { return iterableSearch(x, ft); } export default findIndex; //# sourceMappingURL=index.js.map