var ifs = require('better-if');
ifs({
id: {
expect: 1,
actual: 1
},
password: {
expect: /password/,
actual: 'password'
}
}, function(results) {
console.log(results.id);
});
ifs('testing' == 'testing', function(result) {
console.log(result);
});
ifs('lol wut', function(result) {
console.log(result);
});
ifs([true == true, false, 'test' == 'test', {
isAwesome: {
expect: true,
actual: true
}
}], function(results) {
console.log(results[0]);
console.log(results[1]);
console.log(results[2]);
console.log(results[3].isAwesome);
});
var statement = ifs('true' == 'false');
console.log(statement);