0.0.1 • Published 11 years ago
typedof v0.0.1
type
better type checking
install
node
$ npm install typedof
component
$ component install jwerle/typedof
bower
$ bower install typedof
api
typedof(i)
returns the type of a given input
assert('string' === typedof('string'));
assert('boolean' === typedof(true));
assert('number' === typedof(0));
assert('date' === typedof(new Date));
assert('null' === typedof(null));
assert('undefined' === typedof(undefined));
assert('function' === typedof(function(){}));
assert('array' === typedof([]));
assert('regexp' === typedof(/foo/));
assert('object' === typedof({}));
assert('nan' === typedof(NaN));
license
MIT
0.0.1
11 years ago