check the type of js
npm install js-type-check --save
const typeCheck = require('js-type-check');
npm run test
const typeCheck = require('js-type-check');
typeCheck.isNumber(1);
// => true
typeCheck.isString('test');
// => true
typeCheck.isNull('null');
// => false
typeCheck.getType([1, 2, 3])
// => array
- isNumber
- isString
- isBoolean
- isArray
- isUndefined
- isNull
- getType