UNPKG
imma
Version:
latest (0.0.1)
0.0.1
A collection of functions for dealing with native arrays and objects immutably
imma
/
lib
/
general
/
findLastEntry.js
9 lines
(7 loc)
•
308 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
'use strict'
const
arrayFindLastEntry =
require
(
'../array/findLastEntry'
)
const
objectFindLastEntry =
require
(
'../object/findLastEntry'
)
const
findLastEntry =
module
.
exports
=
(
iterable, fn
) =>
Array
.
isArray
(iterable) ?
arrayFindLastEntry
(iterable, fn) :
objectFindLastEntry
(iterable, fn)