type-is-check

0.0.5 • Public • Published

type-check

Travis build status Code Climate Test Coverage Dependency Status devDependency Status


A lightweight package for type checking in JS

Installation

using cdn:

<script src="https://cdn.rawgit.com/tidupls/type-check/master/dist/type-check.min.js"></script>

using npm:

$ npm i -S type-is-check

using bower:

$ bower install type-is-check

Example

is.num(555); // true
is.str("String"); // true
is.func(function() {}); // true
is.obj({}); // true
is.arr([1,2,3]); // true

API

is.num(numToTest)
is.str(stringToTest)
is.func(functionToTest)
is.obj(objectToTest)
is.arr(arrayToTest)

Tests

$ npm run test

Package Sidebar

Install

npm i type-is-check

Weekly Downloads

0

Version

0.0.5

License

MIT

Last publish

Collaborators

  • tidupls