cloudcmd/modules/itype
2016-12-28 17:42:23 +02:00
..
dist feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
.bower.json feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
bower.json feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
ChangeLog feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
LICENSE feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
package.json feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00
README.md feature(util) Util.type -> itype 2016-12-28 17:42:23 +02:00

iType License NPM version Dependency Status Build Status Coverage Status

Improved type check.

Install

npm i itype --save

How to use?

var itype = require('itype');

console.og(itype.string('hello'))
// returns
true

console.log(itype('world'));
// returns
'string'

console.log(itype.array([1, 2]));
// returns
true

Environments

In old node.js environments that not fully supports es2015, itype could be used with:

var itype = require('itype/legacy');

License

MIT