UNPKG

imma

Version:

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

9 lines (7 loc) 300 B
'use strict' const arrayFindLastIndex = require('../array/findLastIndex') const objectFindLastKey = require('../object/findLastKey') const findLastKey = module.exports = (iterable, fn) => Array.isArray(iterable) ? arrayFindLastIndex(iterable, fn) : objectFindLastKey(iterable, fn)