API Docs for:
Show:

Utils.Types Class

Provides type checking functions

Methods

isArray

(
  • x
)
Boolean

Given a value, checks if the value is a array

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for array values

isBool

(
  • x
)
Boolean

Given a value, checks if the value is a boolean

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for boolean values

isDate

(
  • x
)
Boolean

Given a value, checks if the value is a date object

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for date values

isDocument

(
  • x
)
Boolean

Given a value, checks if the value is equal to the Document object

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True if x is the Document object

isElement

(
  • x
)
Boolean

Given a value, checks if the value is a HTMLElement

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for HTMLElement values

isElementList

(
  • x
)
Boolean

Given a value, checks if the value is a NodeList or HTMLCollection

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for NodeList and HTMLCollection values

isEnum

(
  • x
)
Boolean

Given a value, checks if the value is enumerable. Enumerable values are Arrays, Strings, NodeLists, HTMLCollections and Objects

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True if x is enumerable

isFloat

(
  • x
)
Boolean

Given a value, checks if the value is a floating point number

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for floating point numbers

isFragment

(
  • x
)
Boolean

Given a value, checks if the value is a DocumentFragment

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for DocumentFragment values

isFunction

(
  • x
)
Boolean

Given a value, checks if the value is a function

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for function values

isInteger

(
  • x
)
Boolean

Given a value, checks if the value is an integer

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for integer values

isNil

(
  • x
)
Boolean

Given a value, checks if the value is either null or undefined

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for null and/or undefined values

isNode

(
  • x
)
Boolean

Given a value, checks if the value is a Node

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for Node values

isNull

(
  • x
)
Boolean

Given a value, checks if the value is null

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for null values

isNumber

(
  • x
)
Boolean

Given a value, checks if the value is a number (Int/Float)

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for number values

isNumeric

(
  • x
)
Boolean

Given a value, checks if the value is numeric (Int, Float, NaN, Infinity, ...)

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for any numeric values

isObject

(
  • x
)
Boolean

Given a value, checks if the value is a real object

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for object values

isRegex

(
  • x
)
Boolean

Given a value, checks if the value is a regular expression

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for regular expressions

isSeq

(
  • x
)
Boolean

Given a value, checks if the value is in any way sequencial. Sequencial values are Arrays, Strings, NodeLists and HTMLCollections

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True if x is sequencial

isString

(
  • x
)
Boolean

Given a value, checks if the value is a string

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for string values

isSymbol

(
  • x
)
Boolean

Given a value, checks if the value is a symbol

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for function values

isVoid

(
  • x
)
Boolean

Given a value, checks if the value is null

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True for undefined values

isWindow

(
  • x
)
Boolean

Given a value, checks if the value is equal to the Window object

Parameters:

  • x Any

    The value to test

Returns:

Boolean:

True if x is the Window object