lib/value-mapper.js
function ValueMapper(input, options) {
  // Save input for later
  this.input = input;

  // Save placeholder middlewares
  this.middlewares = [];

  // Fallback options
  options = options || {};

  // Add each of the middlewares
  var middlewares = options.middlewares || [];
  middlewares.forEach(this.addMiddleware, this);
}
function ValueMapper(input, options) {
  // Save input for later
  this.input = input;

  // Save placeholder middlewares
  this.middlewares = [];

  // Fallback options
  options = options || {};

  // Add each of the middlewares
  var middlewares = options.middlewares || [];
  middlewares.forEach(this.addMiddleware, this);
}
function ValueMapper ( input , options ) { // Save input for later this . input = input ; // Save placeholder middlewares this . middlewares = [ ] ; // Fallback options options = options || { } ; // Add each of the middlewares var middlewares = options . middlewares || [ ] ; middlewares . forEach ( this . addMiddleware , this ) ; }
Constructor for mapping values
@param {Object} input Key-value pairs to map values across
@param {Object} [options] Flags to adjust how the mapping is performed
@param {Function[]} [options.middlewares] Middlewares to process resolved value through
Constructor for mapping values