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

Package detail

isfridge

ConnorMcF9ISC2.0.0

Check if anything is a fridge!

fridge, isfridge, fridge checker, check, fridge, what fridge, what is a fridge?

readme

isFridge

Painstakingly written over years and years of work by Connor McFarlane.

CircleCI

Installation

$ npm i isfridge -s
var isFridge = require('isfridge');

Usage

isFridge(x)

Takes one value to compare, returns a promise, boolean on resolve, error on reject.

isFridge.isFridge("fridge")
    .then(function(fridge) {
        if(fridge) {
            console.log("It is a fridge!")
        } else {
            console.log("It is not a fridge!")
        }
        // It is a fridge!
    });

isNotFridge(x)

Takes one value to compare, returns a promise, boolean on resolve, error on reject.

isFridge.isNotFridge("not fridge")
    .then(function(fridge) {
        if(fridge) {
            console.log("It is not a fridge!")
        } else {
            console.log("It is a fridge!")
        }
        // It is not a fridge!
    });

couldBeFridge(x)

Takes one value to compare, returns a promise, boolean on resolve, error on reject.

isFridge.couldBeFridge("not fridge")
    .then(function(fridge) {
        if(fridge) {
            console.log("It could be a fridge!")
        } else {
            console.log("It still could be a fridge!")
        }
        // It could be a fridge!
        // OR
        // It still could be a fridge!
    });

Test

Unit tests are run through mocha.

Running unit tests

$ npm test

https://connormcf.com