fn-istype
v1.0.1
Published
Ask for a type, returns a true/false as answer.
Downloads
9
Maintainers
Readme
fn-istype
Ask for a type, returns a true / false as answer.
Install
npm install fn-istype --save
If you want to use in the browser (powered by Browserify):
bower install fn-istype --save
and later link in your HTML:
<script src="bower_components/fn-istype/dist/fn-istype.js"></script>
Usage
var isType = require('fn-istype');
// raw method
isType(true, 'boolean'); => true
// You can use lowercase or capitalize shorcut by type method
isType.boolean(true); // => true
isType.Boolean(true); // => true
isType.String([]); // => false
Here a list of types supported.
License
MIT © Kiko Beats