lib/prompt-filters.js
function (input) {
    debug('booleanFilter(%s)', input);
    if (_.isBoolean(input)) return input;
    if (_.isString(input)) {
      var lc = input.toLocaleLowerCase();
      var pos = ['false', 'true'].indexOf(lc);
      if (pos > -1) return (pos > 0);
    }
    return undefined;
  }
function (input) {
    debug('booleanFilter(%s)', input);
    if (_.isBoolean(input)) return input;
    if (_.isString(input)) {
      var lc = input.toLocaleLowerCase();
      var pos = ['false', 'true'].indexOf(lc);
      if (pos > -1) return (pos > 0);
    }
    return undefined;
  }
function ( input ) { debug ( 'booleanFilter(%s)' , input ) ; if ( _ . isBoolean ( input ) ) return input ; if ( _ . isString ( input ) ) { var lc = input . toLocaleLowerCase ( ) ; var pos = [ 'false' , 'true' ] . indexOf ( lc ) ; if ( pos > - 1 ) return ( pos > 0 ) ; } return undefined ; }
If we are given a boolean value return it.
If we are given a string with the value 'false' return false
If we are given a string with the value 'true' return true
Otherwise return undefined

@param {(boolean|string|undefined|null)} input
@returns {(true|false|undefined)}
If we are given a boolean value return it . If we are given a string with the value false return false If we are given a string with the value true return true Otherwise return undefined