Skip to content

JiangBao/js-type-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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
  • isString
  • isBoolean
  • isArray
  • isUndefined
  • isNull
  • getType

About

check the type of js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published