typedof

better type checking

npm install typedof
1 downloads in the last week
4 downloads in the last month

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

npm loves you