Nine Pomeranian Monsters
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    is-booleanpublic

    is-boolean

    Predicate that returns true for boolean values.

    Install

    npm install is-boolean

    Usage

    var isBoolean = require('is-boolean');
     
    console.log(isBoolean(false)); // true
    console.log(isBoolean(true)); // true
    console.log(isBoolean(new Boolean(1))); // true
    console.log(isBoolean(!!'foo')); // true
    console.log(isBoolean(!'foo')); // true
    console.log(isBoolean('')); // false
    console.log(isBoolean([])); // false
    console.log(isBoolean(0)); // false
    console.log(isBoolean(null)); // false
    console.log(isBoolean(undefined)); // false
    console.log(isBoolean(1)); // false
    console.log(isBoolean({})); // false
    console.log(isBoolean(function() {})); // false
    console.log(isBoolean(/foo/gi)); // false
    console.log(isBoolean(NaN)); // false

    License

    MIT

    install

    npm i is-boolean

    Downloadsweekly downloads

    4

    version

    0.0.2

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar