Main namespace.
Classes
Namespaces
Methods
-
<static> bool(str)
-
Pass in a string and it will be returned as a boolean. If the string is not
trueorfalse, the string passed will be returned.Parameters:
Name Type Description strString The string to convert into a boolean.
Returns:
- Type
- Boolean
-
<static> extend(defaults, options)
-
Merge defaults with user options.
Parameters:
Name Type Description defaultsObject Default settings.
optionsObject User options.
Returns:
Merged values of defaults and options.
- Type
- Object
-
<static> isBool(val)
-
Returns
trueorfalseif value is a boolean.Parameters:
Name Type Description val* Test value.
Returns:
- Type
- Boolean
-
<static> isNum(val)
-
Returns
trueorfalseif value is a number.Parameters:
Name Type Description val* Test value.
Returns:
- Type
- Boolean
-
<static> isString(val)
-
Returns
trueorfalseif value is a string.Parameters:
Name Type Description val* Test value.
Returns:
- Type
- Boolean
-
<static> isUndef(val [, empty])
-
Returns
trueorfalseif a value is undefined.Parameters:
Name Type Argument Default Description val* Test value.
emptyBoolean <optional>
false Checks if the value is empty, i.e. "". If a value is empty and parameter is not set,
falseis returned.Returns:
- Type
- Boolean
-
<static> nodeArr(nodeList)
-
Returns nodes as an array.
Parameters:
Name Type Description nodeListNodes Nodes from a list of nodes.
Returns:
- Type
- Array
-
<static> parObj(str, base, sep)
-
Parses a string into an object.
Parameters:
Name Type Description strString String to be parse.
baseString Base of the string to be removed.
sepString Used to separate each property.
Returns:
- Type
- Object
-
<static> urlParams(arg)
-
Returns query paramaters.
Parameters:
Name Type Description argString | Object Query parameter.
Returns:
- Type
- String
Example
var str = 'animal=cat&fruit=apple'; // 'animal=cat&fruit=apple' is returned. var obj = {animal: 'cat', fruit: 'apple'}; // 'animal=cat&fruit=apple' is returned. -
<static> windowDimen()
-
Returns the width and height of the window.
Returns:
- Type
- Object