https://github.com/connormcf/node-isfridge
Check if anything is a fridge!
https://github.com/connormcf/node-isfridge
Last synced: 4 months ago
JSON representation
Check if anything is a fridge!
- Host: GitHub
- URL: https://github.com/connormcf/node-isfridge
- Owner: ConnorMcF
- License: isc
- Created: 2016-04-14T22:13:35.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-25T15:07:52.000Z (over 8 years ago)
- Last Synced: 2025-01-28T07:16:40.080Z (5 months ago)
- Language: JavaScript
- Homepage: https://npmjs.com/package/isfridge
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# isFridge
Painstakingly written over years and years of work by Connor McFarlane.[](https://circleci.com/gh/ConnorMcF/node-isfridge)
Installation
----
```
$ npm i isfridge -s
``````js
var isFridge = require('isfridge');
```## Usage
### isFridge(x)
Takes one value to compare, returns a promise, boolean on resolve, error on reject.
```js
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.
```js
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.
```js
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