deepdash-es
Version:
➔ 𝐃eep extension for 𝐋odash-es: ✓ eachDeep ✓ filterDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parent nodes tracking ⋮ Circular references check ⋮ Leaves only mode ⋮ Path as a valid js string or an array ⋮
20 lines (17 loc) • 440 B
JavaScript
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;
}