moleculer
moleculer copied to clipboard
[lodash] Remove usage of _.pick
See #433 for context.
Describe the solution you'd like
Remove usage of _.pick
throughout Moleculer.
Describe alternatives you've considered Vanilla suggestion would be something like
const pick = (o, xs) => {
if(!Array.isArray(xs))
xs = [xs];
return xs.reduce((acc,x) => {
if(o.hasOwnProperty(x))
acc[x] = o[x]
return acc;
}, {})
}
Additional context https://github.com/moleculerjs/moleculer/search?q=.pick&unscoped_q=.pick