UNPKG

@beisen/ethos

Version:

beisencloud pc react components

17 lines (12 loc) 214 B
'use strict'; function findIndexBy(arr, fn) { var i = 0; var len = arr.length; for (; i < len; i++) { if (fn(arr[i]) === true) { return i; } } return -1; } module.exports = findIndexBy;