Skip to content

olegskl/is

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is.js

Build Status Code Climate

browser support

Type checking made easy.

is.js can be used to mitigate type checking inconsistencies until JavaScript provides a reliable way to do the same natively.

It is quite self-descriptif and convenient. For example, instead of:

if (obj && typeof obj === 'object') { ... }

you can write a more intuitive:

if (is.object(obj)) { ... }

Installation

npm install git://github.com/olegskl/is.git

or in package.json as a dependency:

"dependencies": {
    "is": "git://github.com/olegskl/is.git"
}

API

  1. is.array();
  2. is.null();
  3. is.undefined();
  4. is.defined();
  5. is.function();
  6. is.nan();
  7. is.number();
  8. is.string();
  9. is.boolean();
  10. is.object();

Similar projects

License

http://opensource.org/licenses/mit-license.html

About

Type checking made easy.

Resources

Stars

Watchers

Forks

Packages

No packages published