node-uniq
v0.2.0
Published
Remove repeatable item for an array(size: 198B)
Downloads
13
Readme
Node Uniq
Remove repeatable item for an array (size: 198B)
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