Checks if given value is in the target array of allowed values.
The value being checked should not be an object (isObject(value) != true). It must be a primitive javascript type, like a string, number, or boolean.
If the target is not an array false is returned.
Note that when the value is an array, JSON.stringify is used to perform the check. It has a few quirks that are discussed here. These could affect the output in certain edge cases: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
For example Infinity is considered null by JSON.stringify.
The value being checked.
The target array to perform the check against.
True if the value is in the target array, false otherwise.
Generated using TypeDoc
Checks if given value is in the target array of allowed values.
The value being checked should not be an object (isObject(value) != true). It must be a primitive javascript type, like a string, number, or boolean.
If the target is not an array false is returned.
Note that when the value is an array, JSON.stringify is used to perform the check. It has a few quirks that are discussed here. These could affect the output in certain edge cases: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
For example Infinity is considered null by JSON.stringify.