moleculerjs / moleculer

:rocket: Progressive microservices framework for Node.js
https://moleculer.services/
MIT License
6.07k stars 575 forks source link

[lodash] Remove usage of _.compact #747

Open abdavid opened 4 years ago

abdavid commented 4 years ago

See #433 for context.

Describe the solution you'd like Remove usage of _.compact throughout Moleculer.

Describe alternatives you've considered Thesis is that it would be sufficient to use filter(Boolean) E.g.

const filteredList = [true, false, 0, NaN, undefined, "", null].filter(Boolean);
// [ true ]

Additional context https://github.com/moleculerjs/moleculer/search?q=_.compact&unscoped_q=_.compact

abdavid commented 4 years ago

https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_compact