typedof

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i typedof

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • werle