Namespace: is

FooTable.is

This namespace contains commonly used 'is' type methods that return boolean values.

Methods

(static) array(value) → {boolean}

Checks if the value is an array.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) boolean(value) → {boolean}

Checks if the value is a boolean.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) date(value) → {boolean}

Checks if the value is a date.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) defined(value) → {boolean}

Checks if the value is defined.
Parameters:
Name Type Description
value * The value to check is defined.
Returns:
Type
boolean

(static) element(obj) → {boolean}

Checks if the supplied object is an HTMLElement
Parameters:
Name Type Description
obj object The object to check.
Returns:
Type
boolean

(static) emptyArray(value) → {boolean}

Checks if the supplied value is an array and if it is empty.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) emptyObject(value) → {boolean}

Checks if the supplied value is an object and if it is empty.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) emptyString(value) → {boolean}

Checks if the supplied value is a string and if it is empty.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) error(value) → {boolean}

Checks if the value is an error.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) fn(value) → {boolean}

Checks if the value is a function.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) hash(value) → {boolean}

Checks if the value is a hash.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) jq(obj) → {boolean}

Checks if the supplied object is an instance of a jQuery object.
Parameters:
Name Type Description
obj object The object to check.
Returns:
Type
boolean

(static) moment(obj) → {boolean}

Checks if the supplied object is a moment.js date object.
Parameters:
Name Type Description
obj object The object to check.
Returns:
Type
boolean

(static) number(value) → {boolean}

Checks if the value is a number.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) object(value) → {boolean}

Checks if the value is an object.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) promise(obj) → {boolean}

This is a simple check to determine if an object is a jQuery promise object. It simply checks the object has a "then" and "promise" function defined. The promise object is created as an object literal inside of jQuery.Deferred. It has no prototype, nor any other truly unique properties that could be used to distinguish it. This method should be a little more accurate than the internal jQuery one that simply checks for a "promise" method.
Parameters:
Name Type Description
obj object The object to check.
Returns:
Type
boolean

(static) string(value) → {boolean}

Checks if the value is a string.
Parameters:
Name Type Description
value * The value to check.
Returns:
Type
boolean

(static) type(value, type) → {boolean}

Checks if the type of the value is the same as that supplied.
Parameters:
Name Type Description
value * The value to check the type of.
type string The type to check for.
Returns:
Type
boolean

(static) undef(value) → {boolean}

Checks if the value is undefined.
Parameters:
Name Type Description
value * The value to check is undefined.
Returns:
Type
boolean