@cryptosheet/unique

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@cryptosheet/unique
2.0.04 years ago4 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]
)