Swap-Aggregator-Subgraph/node_modules/unique-by
2022-07-03 07:27:35 +05:30
..
test added handler 2022-07-03 07:27:35 +05:30
.editorconfig added handler 2022-07-03 07:27:35 +05:30
.npmignore added handler 2022-07-03 07:27:35 +05:30
.travis.yml added handler 2022-07-03 07:27:35 +05:30
index.js added handler 2022-07-03 07:27:35 +05:30
LICENSE added handler 2022-07-03 07:27:35 +05:30
package.json added handler 2022-07-03 07:27:35 +05:30
README.md added handler 2022-07-03 07:27:35 +05:30

unique-by

build status Davis Dependency status NPM

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 cover This runs the tests with code coverage
  • npm run lint This will run the linter on your code
  • npm test This will run the tests.
  • npm run trace This will run your tests in tracing mode.
  • npm run travis This is run by travis.CI to run your tests
  • npm run view-cover This will show code coverage in a browser

Contributors

  • Matt Morgan

MIT Licenced