0.1.0 • Published 5 months ago

check-typeof v0.1.0

Weekly downloads
154
License
ISC
Repository
github
Last release
5 months ago

Type Checker for Node.js

A Node.js package for checking variable types: array, object, string, number, boolean, or undefined.

Installation

Install the package via npm:

npm install check-typeof --save

Usage

    const $ = require('check-typeof');

    // Check if the variable is an array
    if ($.isArray(variableName)) {
        // Your code for array type
    }

    // Check if the variable is an object
    if ($.isObject(variableName)) {
        // Your code for object type
    }

    // Check if the variable is a string
    if ($.isString(variableName)) {
        // Your code for string type
    }

    // Check if the variable is a number
    if ($.isNumber(variableName)) {
        // Your code for number type
    }

    // Check if the variable is a boolean
    if ($.isBoolean(variableName)) {
        // Your code for boolean type
    }

    // Check if the variable is undefined
    if ($.isUndefined(variableName)) {
        // Your code for undefined type
    }
0.1.0

5 months ago

0.0.2

7 years ago

0.0.1

7 years ago