UNPKG

imma

Version:

A collection of functions for dealing with native arrays and objects immutably

9 lines (8 loc) 216 B
'use strict' const findEntry = module.exports = (array, fn) => { for (let i in array) { const index = Number(i) const value = array[i] if (fn(value, index, array)) return [ index, value ] } }