kc-is

1.0.12 • Public • Published

Is datatype

[js] Check datatype only not to write typeof.

Install

npm install kc-is

Use

var is = require('kc-is');
is.def('a'); // is defined
is.str('a'); // is string
is.num('a'); // is number
is.arr([]);  // is array
is.obj({});  // is object
is.fun('a'); // is function
is.rgx(/a/ig); // is regexp

Package Sidebar

Install

npm i kc-is

Weekly Downloads

0

Version

1.0.12

License

ISC

Unpacked Size

2.57 kB

Total Files

5

Last publish

Collaborators

  • kaisarcode