multi-test

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i multi-test

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • gillstrom