yesnowtf
Version:
A yesno.wtf API library for Node.js
23 lines (18 loc) • 382 B
JavaScript
var yesnowtf = require('./index');
// undefined, yes, no, maybe
var decision;
// make a decision
yesnowtf.decide(decision)
.then(function (data) {
console.log(data);
})
.catch(function (err) {
console.error(err.message);
});
yesnowtf.decide(decision, function (err, data) {
if (err) {
console.error(err.message);
return;
}
console.log(data);
});