Utils.Types Class
Provides type checking functions
Item Index
Methods
isArray
-
x
Given a value, checks if the value is a array
Parameters:
-
xAnyThe value to test
Returns:
True for array values
isBool
-
x
Given a value, checks if the value is a boolean
Parameters:
-
xAnyThe value to test
Returns:
True for boolean values
isDate
-
x
Given a value, checks if the value is a date object
Parameters:
-
xAnyThe value to test
Returns:
True for date values
isDocument
-
x
Given a value, checks if the value is equal to the Document object
Parameters:
-
xAnyThe value to test
Returns:
True if x is the Document object
isElement
-
x
Given a value, checks if the value is a HTMLElement
Parameters:
-
xAnyThe value to test
Returns:
True for HTMLElement values
isElementList
-
x
Given a value, checks if the value is a NodeList or HTMLCollection
Parameters:
-
xAnyThe value to test
Returns:
True for NodeList and HTMLCollection values
isEnum
-
x
Given a value, checks if the value is enumerable. Enumerable values are Arrays, Strings, NodeLists, HTMLCollections and Objects
Parameters:
-
xAnyThe value to test
Returns:
True if x is enumerable
isFloat
-
x
Given a value, checks if the value is a floating point number
Parameters:
-
xAnyThe value to test
Returns:
True for floating point numbers
isFragment
-
x
Given a value, checks if the value is a DocumentFragment
Parameters:
-
xAnyThe value to test
Returns:
True for DocumentFragment values
isFunction
-
x
Given a value, checks if the value is a function
Parameters:
-
xAnyThe value to test
Returns:
True for function values
isInteger
-
x
Given a value, checks if the value is an integer
Parameters:
-
xAnyThe value to test
Returns:
True for integer values
isNil
-
x
Given a value, checks if the value is either null or undefined
Parameters:
-
xAnyThe value to test
Returns:
True for null and/or undefined values
isNode
-
x
Given a value, checks if the value is a Node
Parameters:
-
xAnyThe value to test
Returns:
True for Node values
isNull
-
x
Given a value, checks if the value is null
Parameters:
-
xAnyThe value to test
Returns:
True for null values
isNumber
-
x
Given a value, checks if the value is a number (Int/Float)
Parameters:
-
xAnyThe value to test
Returns:
True for number values
isNumeric
-
x
Given a value, checks if the value is numeric (Int, Float, NaN, Infinity, ...)
Parameters:
-
xAnyThe value to test
Returns:
True for any numeric values
isObject
-
x
Given a value, checks if the value is a real object
Parameters:
-
xAnyThe value to test
Returns:
True for object values
isRegex
-
x
Given a value, checks if the value is a regular expression
Parameters:
-
xAnyThe value to test
Returns:
True for regular expressions
isSeq
-
x
Given a value, checks if the value is in any way sequencial. Sequencial values are Arrays, Strings, NodeLists and HTMLCollections
Parameters:
-
xAnyThe value to test
Returns:
True if x is sequencial
isString
-
x
Given a value, checks if the value is a string
Parameters:
-
xAnyThe value to test
Returns:
True for string values
isSymbol
-
x
Given a value, checks if the value is a symbol
Parameters:
-
xAnyThe value to test
Returns:
True for function values
isVoid
-
x
Given a value, checks if the value is null
Parameters:
-
xAnyThe value to test
Returns:
True for undefined values
isWindow
-
x
Given a value, checks if the value is equal to the Window object
Parameters:
-
xAnyThe value to test
Returns:
True if x is the Window object
