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.
is_dateDetermines if the suspect is a Date.
is_boolDetermines if the suspect is a Boolean.
is_regexDetermines if the suspect is a RegExp.

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_typeof, 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_typeof, is_numeric, is_string, is_array, is_date, is_bool, is_regex

is_date

var is_date = function(suspect)

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

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_typeof, is_numeric, is_string, is_array, is_number, is_bool, is_regex

is_bool

var is_bool = function(suspect)

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

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_typeof, is_numeric, is_string, is_array, is_number, is_regex

is_regex

var is_regex = function(suspect)

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

Parameters

suspectsuspect variable to test

Returns

bool

See Also

is_typeof, is_numeric, is_string, is_array, is_number, is_bool

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.
var is_date = function(suspect)
Determines if the suspect is a Date.
var is_bool = function(suspect)
Determines if the suspect is a Boolean.
var is_regex = function(suspect)
Determines if the suspect is a RegExp.
Close