1.0.1 • Published 8 years ago

multi-test v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

multi-test Build Status

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