# unique-by

> Create a unique array of objects

Latest version **1.0.0** (published 2015-04-19) · 0 weekly downloads

## Install

```sh
npm install unique-by
pnpm add unique-by
yarn add unique-by
bun add unique-by
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-04-19 |
| First published | 2015-04-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Matt Morgan |
| Maintainers | mlmorg |

## Links

- npm: https://www.npmjs.com/package/unique-by
- Repository: https://github.com/mlmorg/unique-by
- Issues: https://github.com/mlmorg/unique-by/issues
- npm.io page: https://npm.io/package/unique-by

## Recent versions

- 1.0.0 (latest) — 2015-04-19

## README

# unique-by

[![build status][build-png]][build]
[![Davis Dependency status][dep-png]][dep]
[![NPM][npm-png]][npm]

Create a unique array of objects.

## Example

```js
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

  [build-png]: https://secure.travis-ci.org/mlmorg/unique-by.png
  [build]: https://travis-ci.org/mlmorg/unique-by
  [dep-png]: https://david-dm.org/mlmorg/unique-by.png
  [dep]: https://david-dm.org/mlmorg/unique-by
  [npm-png]: https://nodei.co/npm/unique-by.png?stars&downloads
  [npm]: https://nodei.co/npm/unique-by

---
_Source: https://npm.io/package/unique-by · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
