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

20 lines (17 loc) 440 B
import getReduceDeep from './getReduceDeep.js'; export default function getMapDeep(_) { var reduceDeep = getReduceDeep(_); function mapDeep(obj, iteratee, options) { iteratee = _.iteratee(iteratee); return reduceDeep( obj, (acc, value, key, parentValue, context) => { acc.push(iteratee(value, key, parentValue, context)); return acc; }, [], options ); } return mapDeep; }