I read on some forums that lodash chain should be avoided when possible for better performances and readability of code. So is there a way to use native javascript functions on collection to replace this code.
_(userCollection).chain()
.map('name')
.compact()
.uniq()
.value();
Something like this bellow, but I' not sure that it gives any added value to write it like so
_.uniq(_.compact(userCollection.map('name')))