8ccddcaaa4346ff79aebde09fe55728725d5031c4ffa5445bea08e529da660aa943644398b23d31a702ffdbc97ab5bef273b5231353a7d768dc9007e59c0e4 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # array-unique [![NPM version](https://badge.fury.io/js/array-unique.svg)](http://badge.fury.io/js/array-unique) [![Build Status](https://travis-ci.org/jonschlinkert/array-unique.svg)](https://travis-ci.org/jonschlinkert/array-unique)
  2. > Return an array free of duplicate values. Fastest ES5 implementation.
  3. ## Install with [npm](npmjs.org)
  4. ```bash
  5. npm i array-unique --save
  6. ```
  7. ## Usage
  8. ```js
  9. var unique = require('array-unique');
  10. unique(['a', 'b', 'c', 'c']);
  11. //=> ['a', 'b', 'c']
  12. ```
  13. ## Related
  14. * [arr-diff](https://github.com/jonschlinkert/arr-diff): Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
  15. * [arr-union](https://github.com/jonschlinkert/arr-union): Returns an array of unique values using strict equality for comparisons.
  16. * [arr-flatten](https://github.com/jonschlinkert/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
  17. * [arr-reduce](https://github.com/jonschlinkert/arr-reduce): Fast array reduce that also loops over sparse elements.
  18. * [arr-map](https://github.com/jonschlinkert/arr-map): Faster, node.js focused alternative to JavaScript's native array map.
  19. * [arr-pluck](https://github.com/jonschlinkert/arr-pluck): Retrieves the value of a specified property from all elements in the collection.
  20. ## Run tests
  21. Install dev dependencies.
  22. ```bash
  23. npm i -d && npm test
  24. ```
  25. ## Contributing
  26. Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-unique/issues)
  27. ## Author
  28. **Jon Schlinkert**
  29. + [github/jonschlinkert](https://github.com/jonschlinkert)
  30. + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
  31. ## License
  32. Copyright (c) 2015 Jon Schlinkert
  33. Released under the MIT license
  34. ***
  35. _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 24, 2015._