Get the unique values from array, objects etc.
unique-values
Get the unique values from array, objects etc.
Usage
npm i -S unique-values
const uniqueValues = require('unique-values') uniqueValues.getUniqueArrayValues([1, 2, 1, 2, 3, 4, 5, 10, 2, 3, 2, 3, 23, 2]) // returns // [1, 2, 3, 4, 5, 10, 23] uniqueValues.getUniqueObjectValues({'a': 12, 'b': 14, 'c': 14, 'd': 12}) // returns // [12, 14]
License
MIT © Git Faf 2017
HomePage
https://github.com/gitfaf/unique-values#readme