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) 362 B
'use strict'; 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; } module.exports = getMixOrPatchIn;