0.3.2 • Published 8 years ago

array-unique v0.3.2

Weekly downloads
19,480,461
License
MIT
Repository
github
Last release
8 years ago

array-unique NPM version NPM downloads Build Status

Remove duplicate values from an array. Fastest ES5 implementation.

Install

Install with npm:

$ npm install --save array-unique

Usage

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']

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
  • arr-map: Faster, node.js focused alternative to JavaScript's native array map. | homepage
  • arr-pluck: Retrieves the value of a specified property from all elements in the collection. | homepage
  • arr-reduce: Fast array reduce that also loops over sparse elements. | homepage
  • arr-union: Combines a list of arrays, returning a single array with unique values, using strict equality… more | 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:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb-generate-readme, v0.1.28, on July 31, 2016.

extglobnanomatcharchetype-librarycomponennenttvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imageydd-buildrn-send-smsspecify-importsbabel-specify-imports@laundry/laundrygew-nodejs-api-client@arisageha/react-lazyload@arisageha/react-lazyload-fixpicky-util@cashremit/cr-streamline-iconsreact-native-template-rfbaseboilerplate-hapijscloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apineighbourhoodwatchdeneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modbitget@tempicolabs/clibsh-jaskerreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewercthpb-plugin-socialgulp-pipelinepanqibaoreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testuinz-notificationwilscanner@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@saaspe/componentsplginexpand-react-bridgesearch-engine-client-detailed@everything-registry/sub-chunk-1165ondgulp-angular-module-dependenciesgoogle-remakeglobal-pathsgruppergrunt-typescript-projectgulp-load-pluginsguide-detailgulp-ng-module-dependenciesjesusdemojeuxuiinstall-rstatsjrennsoh88-react-native-scroll-indicatorhendo-cligitignore-loadergix-npm-servergrid-component-react-ex-1graphql-relay-servergriffin-ui-librarygrids-over-polygonka-flow.jskaerukunkafirchain-tetrisiex-sdkielmhelp-widgetgw2api-clientgw2e-account-statisticsgulp-walkergzup-react-image-file-resizerguruwayguruway.jsh5-templetehalcssteadhcm-jshendo-cli-luozheaohexyun.helpersisv-light-webpack-configioc-extractor-without-sortjamuskalim
0.3.2

8 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago