UNPKG

deepdash

Version:

➔ 𝐃eep standalone lib / 𝐋odash extension: ✓ eachDeep ✓ filterDeep ✓ mapDeep ✓ reduceDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parents stack ⋮ Circular check ⋮ Leaves only mode ⋮ Children mode ⋮ cherry-pick ⋮ esm

24 lines (19 loc) 479 B
'use strict'; var getReduceDeep = require('./getReduceDeep.js'); function getMapDeep(_) { var reduceDeep = getReduceDeep(_); function mapDeep(obj, iteratee, options) { iteratee = _.iteratee(iteratee); return reduceDeep( obj, function (acc, value, key, parentValue, context) { acc.push(iteratee(value, key, parentValue, context)); return acc; }, [], options ); } return mapDeep; } module.exports = getMapDeep;