Bolshakova Anna ab21a11190 lab | 2 долоо хоног өмнө | |
---|---|---|
.. | ||
LICENSE | 2 долоо хоног өмнө | |
README.md | 2 долоо хоног өмнө | |
index.js | 2 долоо хоног өмнө | |
package.json | 2 долоо хоног өмнө |
Remove duplicate values from an array. Fastest ES5 implementation.
Install with npm:
$ npm install --save array-unique
var unique = require('array-unique');
var arr = ['a', 'b', 'c', 'c'];
console.log(unique(arr)) //=> ['a', 'b', 'c']
console.log(arr) //=> ['a', 'b', 'c']
/* The above modifies the input array. To prevent that at a slight performance cost: */
var unique = require("array-unique").immutable;
var arr = ['a', 'b', 'c', 'c'];
console.log(unique(arr)) //=> ['a', 'b', 'c']
console.log(arr) //=> ['a', 'b', 'c', 'c']
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.28, on July 31, 2016.