@cryptosheet/unique
v2.0.0
Published
use `.reduce` to get the unique values of an array of objects
Downloads
14
Readme
@cryptosheet/unique
use .reduce
to get the unique values of an array of objects
Usage
const unique = require('@cryptosheet/unique')
const array = [{foo: 1}, {foo: 2}, {foo: 1}]
assert.deepEqual(
array.reduce(unique('foo'), []),
[1, 2]
)