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 _.uniq #750

Open abdavid opened 4 years ago

abdavid commented 4 years ago

See #433 for context.

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

Describe alternatives you've considered Source: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_uniq

// Native
var array = [1, 2, 1, 4, 1, 3];
var result = [...new Set(array)];
console.log(result)
// output: [1, 2, 4, 3]

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

icebob commented 4 years ago

Need to test that it works correctly with objects as well.