isTypeFor()

Creates a partial isType() function.

This function is valid in v2.8.0 to v2.24.3. This function has been downloaded 61 times.

Parameters

{…string} typeNames
One or more type names to check against values.
{boolean=} opt_negate Optional, Default:false
If specified the returned function's return value will always be negated.

Returns

{Function}
A function that can be used to see if any value passed to it is one of the type names passed in as typeNames. The return value will indicate if one of the type names matches the type of the value passed to it. If opt_negate is true the return value of this function will be the opposite.

Required Functions

This function directly requires the following functions which are included automatically:

  • slice()
    Slice does not modify the original array, but instead returns a shallow copy of elements from the original array.
  • typeOf()
    Either gets the type of a value or adds a constructor registering its custom type name.