node-uniq

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

Usage no npm install needed!

<script type="module">
  import nodeUniq from 'https://cdn.skypack.dev/node-uniq';
</script>

README

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