@cryptosheet/unique

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @cryptosheet/unique

Weekly Downloads

1

Version

2.0.0

License

ISC

Unpacked Size

2.17 kB

Total Files

4

Last publish

Collaborators

  • christian_fei