Notify President Madagascar
    Have ideas to improve npm?Join in the discussion! »

    absent

    1.0.1 • Public • Published

    Absent

    Build Status Coverage Status

    Absent checks existence or blankness of a variable.

    What is the goal of this project?

    This project allows you to make both undefined checking and null checking on one method call. This makes your code more clean.

    Installation

    $ npm install --save absent

    Usage

    var helper = require('absent');
     
     
    // null checking of null variable
    var instance = null;
    if( helper.isNull(instance) ) { ... }
     
    var undefinedInstance;
    if( helper.isNull(undefinedInstance) ) { ... }
     
    var str = "";
    if( helper.isBlank(str) ) { ... }
     
    if( helper.isSet(str) ) { ... }
     
    var isExist = false;
     
    if( helper.not(isExist) ) { ... }

    Test

    This module is well tested. You can run:

    • npm test to run the tests under Node.js.

    Test results

    License

    MIT

    Install

    npm i absent

    DownloadsWeekly Downloads

    16

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar