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)
About
Related projects
arr-diff: Returns an array with only the unique values from the first array, by excluding all… more | homepage
arr-flatten: Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(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: