UNPKG

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 ⋮

16 lines (15 loc) 327 B
export default function getMixOrPatchIn(_) { function mixOrPatchIn(name, method, chain) { if (!_[name]) { if (_.mixin) { var patch = {}; patch[name] = method; _.mixin(patch, { chain: chain }); } else { _[name] = method; } } return _; } return mixOrPatchIn; }