check-typeof

0.0.2 • Public • Published

check-typeof

Npm package to checks the variable type is an array or object or string or number or boolean or undefined

Installation

Installation is easiest through npm:

npm install check-typeof --save

Usage

    var $ = require('check-typeof');
 
    if ($.isArray(variable_name)) { //if true
        //your code
    }
 
    if ($.isObject(variable_name)) { //if true
        //your code
    }
 
    if ($.isString(variable_name)) { //if true
        //your code
    }
 
    if ($.isNumber(variable_name)) { //if true
        //your code
    }
 
    if ($.isBoolean(variable_name)) { //if true
        //your code
    }
 
    if ($.isUndefined(variable_name)) { //if true
        //your code
    }
 

Package Sidebar

Install

npm i check-typeof

Weekly Downloads

31

Version

0.0.2

License

ISC

Last publish

Collaborators

  • mambaz