Socket
Socket
Sign inDemoInstall

array-unique

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    array-unique

Return an array free of duplicate values. Fastest ES5 implementation.


Version published
Weekly downloads
15M
decreased by-1.38%
Maintainers
1
Install size
10.4 kB
Created
Weekly downloads
 

Package description

What is array-unique?

The array-unique npm package is a small utility that removes duplicate values from an array. It is useful when you need to ensure that an array contains only unique items without having to write custom deduplication logic.

What are array-unique's main functionalities?

Deduplicate an array

This feature allows you to remove duplicate values from an array, resulting in an array of only unique items. The `arrayUnique` function is used as a callback for the `filter` method.

[1, 2, 2, 3, 4, 4, 5, 5].filter(arrayUnique)

Other packages similar to array-unique

Readme

Source

array-unique NPM version

Return an array free of duplicate values. Fastest ES5 implementation.

Install with npm

npm i array-unique --save

Run tests

npm test

Usage

var unique = require('array-unique');

unique(['a', 'b', 'c', 'c']);
//=> ['a', 'b', 'c']

API

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on December 02, 2014.

FAQs

Last updated on 02 Dec 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc