JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 306
  • Score
    100M100P100Q92709F
  • License MIT

This package is use for Validating whether variable is boolean or not and converting boolean variable to javascript boolean.

Package Exports

  • node-boolify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-boolify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Boolify

Boolify is a powerful boolean based module for Nodejs.

  • It is very fast, simple and robust.
  • It is use for Validating whether argument is boolean
  • It is use for parsing to javascript Boolean value.

Boolify Installation!

    npm  install --save node-boolify

Boolify Setup!

  • ES6 import
       import { isBoolean, Boolify } from "node-boolify";
  • Javascript require
       var isBoolean = require('node-boolify').isBoolean;
       var Boolify = require('node-boolify').Boolify;

Validation Results

        isBoolean(true); //true
        isBoolean('true'); //true
        isBoolean('TRUE'); //false
        isBoolean(1); //true
        isBoolean(2); //false
        isBoolean(false); //true
        isBoolean('false'); //true
        isBoolean('FALSE'); //false
        isBoolean(0); //true
        isBoolean(null); //false
        isBoolean(undefined); //false
        isBoolean(); //false
        isBoolean(''); //false

Boolean Conversion Results

        Boolify(true); //true
        Boolify('true'); //true
        Boolify('TRUE'); //null
        Boolify(1); //true
        Boolify(2); //null
        Boolify(false); //false
        Boolify('false'); //false
        Boolify('FALSE'); //null
        Boolify(0); //false
        Boolify(null); //null
        Boolify(undefined); //null
        Boolify(); //null
        Boolify(''); //null