unique-object

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i unique-object

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lamansky