npm install admit --save
- admit values into arrays
- ban values from arrays
- test if arrays contains values
var admit = require('admit')
admit([0, 1, 2], 2) // [0, 1, 2]
admit([0, 1, 2], 3) // [0, 1, 2, 3]
admit.has([0, 1, 2], 1) // true
admit.has([0, 1, 2], 3) // false
admit.ban([0, 0, 2], 0) // [2]
admit.is(1, 1) // true
admit.is(1, 2) // false
admit.use(Object.is) // cloned admit api that uses Object.is
- stack can be an array or array-like object
- value can be any type
Add value into stack if stack doesn't already contain value
Alias: admit.admit(stack, value)
Test if stack contains value
Remove all instances of value from stack
Simple default ===
comparison
Create a new version of admit that uses a different is function
var admit = require('admit')
var equal = require('deep-equal')
admit = admit.use(equal)
MIT