@cryptosheet/unique

use `.reduce` to get the unique values of an array of objects

Stats

StarsIssuesVersionUpdatedCreatedSize
@cryptosheet/unique
2.0.03 years ago3 years agoMinified + gzip package size for @cryptosheet/unique in KB

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]
)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.