1.0.0 • Published 6 years ago

unique-object v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

unique-object

Returns a copy of an Object or Map with duplicate values removed.

This module is an alias of unique-map, which supports both Maps and Objects.

Installation

npm install unique-object --save

Usage Example

const uniqueObject = require('unique-object')

const obj = {
  1: 'A',
  2: 'A',
  3: 'B',
}

const u = uniqueObject(obj)
u[1] // 'A'
u[2] // undefined
u[3] // 'B'

For more details, see the documentation for the unique-map module.

1.0.0

6 years ago