existence.js

Summary
existence.js
Functions
is_definedChecks if a variable is undefined.
is_undefinedChecks if a variable is defined.
is_typeofDetermine an object’s type strictly by comparing constructors.
is_numericDetermine if the suspect string represents a numeric value.
is_stringDetermine the suspect is a string.
is_arrayDetermine if the suspect is an array.
is_numberDetermines if the suspect is a number.

Functions

is_defined

var is_defined = function(suspect)

Checks if a variable is undefined.

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_undefined

is_undefined

var is_undefined = function(suspect)

Checks if a variable is defined.

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_defined

is_typeof

var is_typeof = function(type,
suspect)

Determine an object’s type strictly by comparing constructors.

Parameters

typeThe type you expect (ie.  String, Number, Array without quotes: is_typeof(String, ‘hello’): // true)
suspectThe variable to check against type

Returns

bool

See Also

is_numeric, is_string, is_array, is_number, <is_date>, <is_bool>, <is_regex>

is_numeric

var is_numeric = function(suspect)

Determine if the suspect string represents a numeric value.

Parameters

suspectvariable to check for numeric value

Returns

bool

See Also

is_number

is_string

var is_string = function(suspect)

Determine the suspect is a string.  This is a proxy method for is_typeof(String, suspect).

Parameters

suspectsupect variable to test

Returns

bool

See Also

is_typeof, is_numeric, is_array, is_number, <is_date>, <is_bool>, <is_regex>

is_array

var is_array = function(suspect)

Determine if the suspect is an array.  This is a proxy method for is_typeof(Array, suspect).

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_numeric, is_string, is_number, <is_date>, <is_bool>, <is_regex>

is_number

var is_number = function(suspect)

Determines if the suspect is a number.  This is a proxy method for is_typeof(Number, suspect)

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_numeric, is_string, is_array, <is_date>, <is_bool>, <is_regex>

var is_defined = function(suspect)
Checks if a variable is undefined.
var is_undefined = function(suspect)
Checks if a variable is defined.
var is_typeof = function(type,
suspect)
Determine an object’s type strictly by comparing constructors.
var is_numeric = function(suspect)
Determine if the suspect string represents a numeric value.
var is_string = function(suspect)
Determine the suspect is a string.
var is_array = function(suspect)
Determine if the suspect is an array.
var is_number = function(suspect)
Determines if the suspect is a number.
Close