1.0.1 • Published 4 years ago
isbars v1.0.1
Isbars
IsBars allows you to use english rather then symbols for writing if statements.
Examples
const is = require('isbars');
const args = { x: 2, y: 3 };
if(is("x bigger than y", args)) {
console.log("This won't log as x is not bigger than y");
// x is defined in the args object, so is y.
};
if(is("3 bigger than 2")) {
console.log("This will log as 3 is bigger than 2");
};
// You can replace bigger with smaller for an reversed result.
Still in eraly beta!