unique-by

2019-08-15

unique-by是什么

什么是unique-by,Create a unique array of objects

unique-by使用教程帮助文档

unique-by

build statusDavis 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 coverThis runs the tests with code coverage
  • npm run lintThis will run the linter on your code
  • npm 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 tests
  • npm run view-coverThis will show code coverage in a browser

Contributors

  • Matt Morgan

MIT Licenced


上一篇:itape
下一篇:peer-info
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部