js-type-check
v1.0.0
Published
check the type of js
Downloads
3
Readme
type-check
check the type of js
Usage
npm install js-type-check --save
const typeCheck = require('js-type-check');
Test
npm run test
Example
const typeCheck = require('js-type-check');
typeCheck.isNumber(1);
// => true
typeCheck.isString('test');
// => true
typeCheck.isNull('null');
// => false
typeCheck.getType([1, 2, 3])
// => array
API
isNumber
Parameters:- <> input
Return:
- result
isString
Parameters:- <> input
Return:
- result
isBoolean
Parameters:- <> input
Return:
- result
isArray
Parameters:- <> input
Return:
- result
isUndefined
Parameters:- <> input
Return:
- result
isNull
Parameters:- <> input
Reutrn:
- result
getType
Parameters:- <> input
Return:
- type