1.1.0 • Published 9 years ago
yepnope v1.1.0
Yepnope
Yepnope transforms yes/no answers into bools, very usefull for chatbots and command line tools.
Usage
require the lib using const yepnope = require('yepnoe')
  var ok = new yepnope('yes')
  //ok.true === true
  var notok = new yepnope('nope')
  //notok.false === trueExample
  function parseAnswer(text){
    var response = new yepnope(text);
    if(response.true){
      return 'thanks! i\'ll do that!';
    }
    if(response.false){
      return 'ups! i\'ll do something else then!';
    }
    if(!response.false && !response.true){
      return 'I don\'t understand!'
    }
  }