Either gets the type of a value or adds a constructor registering its custom type name.

This function is valid in v2.0.0 to v2.7.0. This function has been downloaded 0 times.


{*} value
A value whose type name will be returned. Alternatively if opt_typeNameToAdd is passed this must be the constructor for the corresponding type name.
{string=} opt_typeNameToAdd Optional
If specified, value will be looked for within an array of all known constructors and if not found a new entry will be added along with this given type name.


If opt_typeNameToAdd was omitted a string representation of value's type usually capitalized unless "null" or "undefined" is returned. If opt_typeNameToAdd is given, the constructor passed as value will be searched and a boolean indicating whether or not it needed to be added will be returned.

Requiring Functions

This function is directly required by the following functions:

  • call()
    Calls a function whether it be a global prototype function or a YourJS function or a custom bindable.
  • calls()
    Makes multiple calls using the YourJS call() function.
  • chain()
    Creates a chained version of a value.
  • getCookie()
    Retrieves one or more cookies.
  • groupBy()
    Takes an array and groups the items together based on a given hasher function.
  • isArrayLike()
    Determines if an object is an array or at least array-like.
  • isType()
    Determines if a value is of a specific type or one of a list of specific types.
  • replace()
    Replace targeted substrings with new strings.
  • sortBy()
    Shallow copies and sorts an array given specific criteria.