node-uniq

Remove repeatable item for an array(size: 198B)


Keywords
uniq
License
ISC
Install
npm install node-uniq@0.2.0

Documentation

Node Uniq

Remove repeatable item for an array (size: 198B)

Build Status

Install

npm install node-uniq

Usage

import uniq from 'node-uniq';

let arr = [0, 1, 2, 1];
uniq(arr); # => [0, 1, 2]


let arr = [{id: 1}, {id: 2}, {id: 3}, {id: 2}];
uniq(arr, i => i.id); # => [{id: 1}, {id: 2}, {id: 3}]

Run Test

npm install

npm run test