2.0.0 • Published 7 years ago

isfridge v2.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

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

2.0.0

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago