Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

check-tool

vyarmak207MIT1.0.5

Simple set of functions to check variables. Includes check of undefined / defined / defined and not null / defined and not empty / is number / is function is object

check, tool, undefined, is defined, isnotnull, is not null, is not empty, is object, is function, is number, check number, check object

readme

check-tool Build Status

Tired of passing it from project to project - put this simple set of functions to check variables into a package. Includes check of undefined / defined / defined and not null / defined and not empty / is number / is function is object

Install

$ npm install check-tool

Usage

var checkTool = require('check-tool')

if (checkTool.isDefined(varaiable)) {
    // do something...
}

if (checkTool.isNotNull(varaiable)) {
    // do something...
}

if (checkTool.isNotEmpty(varaiable)) {
    // do something...
}

if (checkTool.isEmpty(varaiable)) {
    // do something...
}

if (checkTool.isNotNaN(varaiable)) {
    // do something...
}

if (checkTool.isObject(varaiable)) {
    // do something...
}

if (checkTool.isFunction(varaiable)) {
    // do something...
}

if (checkTool.isNumber(varaiable)) {
    // do something...
}