moleculer icon indicating copy to clipboard operation
moleculer copied to clipboard

[lodash] Remove usage of _.uniq

Open abdavid opened this issue 5 years ago • 1 comments

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

abdavid avatar May 22 '20 19:05 abdavid

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

icebob avatar May 22 '20 19:05 icebob