of
v1.0.0
Published
type checking
Downloads
1,058
Readme
##of
type checking
check type of value. returns capitalised name of type. e.g., 'Object', 'Function', 'Array':
of.type(value);
returns true if value is an element, otherwise false:
of.element(value);
returns true if value is a string, otherwise false:
of.string(value);
returns true if value is an array, otherwise false:
of.array(value);
returns true if value is an object, otherwise false:
of.object(value);
returns true if value is a function, otherwise false:
of['function'](value);
returns true if value is a boolean, otherwise false:
of.boolean(value);
returns true if value is a number, otherwise false:
of.number(value);
returns true if value is undefined, otherwise false:
of['undefined'](value);
returns true if value is an arguments array, otherwise false:
of['arguments'](value);
returns true if value is a regex, otherwise false:
of.regex(value);
returns true if value is null, otherwise false:
of['null'](value);
returns true if value is a date object, otherwise false:
of.date(value);