multi-test
v1.0.1
Published
Test if something is equal to any of the given values.
Downloads
3
Maintainers
Readme
multi-test
Test if something is equal to any of the given values.
Install
$ npm install --save multi-test
Example
var multiTest = require('multi-test');
multiTest(65, [7, 21, 50, 65, 100]);
//=> true
multiTest('foo', ['horse', 'bar', 'foo']);
//=> true
multiTest(['foo'], [['foo'], ['bar']]);
//=> true
multiTest({foo: 'bar'}, [{tex: 'mex'}, {foo: 'bar'}]);
//=> true
API
multiTest(input, values)
input
Required
Type: Any type
Value to test.
values
Required
Type: array
Values to check against.
License
MIT © Andreas Gillström