https://github.com/richienb/array-non-uniq
Get the non-unique items in an array.
https://github.com/richienb/array-non-uniq
Last synced: 10 months ago
JSON representation
Get the non-unique items in an array.
- Host: GitHub
- URL: https://github.com/richienb/array-non-uniq
- Owner: Richienb
- License: mit
- Created: 2020-03-22T00:11:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-14T05:15:47.000Z (over 4 years ago)
- Last Synced: 2025-02-19T10:02:43.729Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# array-non-uniq [](https://travis-ci.com/Richienb/array-non-uniq)
Get the non-unique items in an array.
[](https://npmjs.com/package/array-non-uniq)
## Install
```sh
npm install array-non-uniq
```
## Usage
```js
const arrayNonUniq = require("array-non-uniq");
arrayNonUniq([1, 1, 2, 3, 3]);
//=> [1, 3]
arrayNonUniq(["foo", "foo", "bar", "foo"]);
//=> ['foo']
```
## API
### arrayNonUniq(array)
#### array
Type: `array`
The array to process.