lib/value-mapper.js
function (key) {
    // Assume the middleware is a function
    var middleware = key;

    // If the middleware is a string
    if (typeof middleware === 'string') {
      // Look it up and assert it was found
      middleware = MIDDLEWARES[key];
      assert(middleware, 'value-mapper middleware "' + key + '" could not be found."');
    }

    // Add the middleware to our stack
    this.middlewares.push(middleware);
  }
function (key) {
    // Assume the middleware is a function
    var middleware = key;

    // If the middleware is a string
    if (typeof middleware === 'string') {
      // Look it up and assert it was found
      middleware = MIDDLEWARES[key];
      assert(middleware, 'value-mapper middleware "' + key + '" could not be found."');
    }

    // Add the middleware to our stack
    this.middlewares.push(middleware);
  }
function ( key ) { // Assume the middleware is a function var middleware = key ; // If the middleware is a string if ( typeof middleware === 'string' ) { // Look it up and assert it was found middleware = MIDDLEWARES [ key ] ; assert ( middleware , 'value-mapper middleware "' + key + '" could not be found."' ) ; } // Add the middleware to our stack this . middlewares . push ( middleware ) ; }
Add middleware to instance
Add middleware to instance