Unique action for ChainyJS
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}]
- 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
Discover the change history by heading on over to the HISTORY.md
file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
These amazing people are maintaining this project:
- Benjamin Lupton [email protected] (https://github.com/balupton)
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Licensed under the incredibly permissive MIT license
Copyright © 2014+ Bevry Pty Ltd [email protected] (http://bevry.me)