UNPKG

is-computer-on-fire

Version:

Adds various helpful functions to assert the state of the machine before performing any heavy tasks.

7 lines (5 loc) 427 B
const isComputerOnFire = require("./is-computer-on-fire.js"); console.log(isComputerOnFire.isComputerOn()); // true (unless your computer is off) isComputerOnFire.assertComputerIsOn(); // no exception (unless your computer is off) console.log(isComputerOnFire.isComputerOnFire()); // false (unless your computer is burning) isComputerOnFire.assertComputerIsNotOnFire(); // no exception (unless your computer is burning)