Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via pnpm

array-unique 0.3.2

Remove duplicate values from an array. Fastest ES5 implementation.
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 Nov 2014
Version published
1 Aug 2016
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
array-unique@0.3.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ⓘ This is a list of array-unique 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does array-unique do?

The array-unique npm package is a highly efficient ES5 implementation primarily used for removing duplicate values from an array. When you consider the fact that handling large data sets frequently involves managing arrays, the ability to swiftly and effectively eliminate duplicate values becomes paramount. array-unique offers precisely this capability, improving productivity and enhancing efficiency.

How do you use array-unique?

To begin using the array-unique package, start by installing it via npm with the following command:

$ npm install --save array-unique

Next, require the array-unique package in your JavaScript file:

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

Now, you should be able to apply the package to remove duplicates from any array. For example:

var arr = ['a', 'b', 'c', 'c'];
console.log(unique(arr)) // Output: ['a', 'b', 'c']

Note that by default, array-unique modifies the input array. To retain the original array unchanged (at a slight cost to performance), use the immutable version:

var unique = require("array-unique").immutable;

Here, the original array remains intact:

var arr = ['a', 'b', 'c', 'c'];
console.log(unique(arr)) // Output: ['a', 'b', 'c']
console.log(arr)         // Output: ['a', 'b', 'c', 'c']

Where are the array-unique docs?

The documentation for array-unique can be found on its GitHub page here. This readme provides robust details on the package, including installation instructions, usage examples, and a description of the package’s primary function. For those who wish to contribute to the package, the readme also provides clear guidance, making it an all-inclusive resource for both new and existing users of array-unique.