Skip to content
/ uniq Public

Chainy action that rejects duplicates inside the chain's data array, based on the item itself, or a particular field

License

Notifications You must be signed in to change notification settings

chainyjs/uniq

Repository files navigation

Unique action for ChainyJS

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Chainy action that rejects duplicates inside the chain's data array, based on the item itself, or a particular field

Can optionally accept a single argument specifying a field to check for duplicates for

require('chainy').create().require('set uniq log')
	// Unique by item
	.set([1, 1, 2, 3])
	.uniq()
	.log()  // [1, 2, 3]

	// Unique by item field
	.set([{id:1}, {id:1}, {id:2}])
	.uniq('id')
	.log()  // [{id:1}, {id:2}]

Install

  • Use: require('chainy-plugin-uniq')
  • Install: npm install --save chainy-plugin-uniq
  • Use: require('chainy-plugin-uniq')
  • Install: npm install --save chainy-plugin-uniq
  • CDN URL: //wzrd.in/bundle/[email protected]
  • Use: require('chainy-plugin-uniq')
  • Install: ender add chainy-plugin-uniq

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Licensed under the incredibly permissive MIT license

Copyright © 2014+ Bevry Pty Ltd [email protected] (http://bevry.me)

About

Chainy action that rejects duplicates inside the chain's data array, based on the item itself, or a particular field

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published