lib/prompt-filters.js
function (filterArray) {
    return function (input) {
      return filterArray.reduce(function (previousValue, filter) {
        return filter.call(this, previousValue);
      }.bind(this), input);
    };
  }
function (filterArray) {
    return function (input) {
      return filterArray.reduce(function (previousValue, filter) {
        return filter.call(this, previousValue);
      }.bind(this), input);
    };
  }
function ( filterArray ) { return function ( input ) { return filterArray . reduce ( function ( previousValue , filter ) { return filter . call ( this , previousValue ) ; } . bind ( this ) , input ) ; } ; }
Given some input text and a array of filters,
we sequentially apply the filters to get the final value

@param filterArray
@returns function
Given some input text and a array of filters we sequentially apply the filters to get the final value