mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
1.1 KiB
1.1 KiB
unique-by
Create a unique array of objects.
Example
var uniqueBy = require('unique-by');
// With a function
uniqueBy(arr, function getValue(obj) {
return obj.someKey;
});
// With a key string
uniqueBy(arr, 'someKey');
Installation
npm install unique-by
Tests
npm test
NPM scripts
npm run coverThis runs the tests with code coveragenpm run lintThis will run the linter on your codenpm testThis will run the tests.npm run traceThis will run your tests in tracing mode.npm run travisThis is run by travis.CI to run your testsnpm run view-coverThis will show code coverage in a browser
Contributors
- Matt Morgan


