tinyg.js
function (k, v) {
        promiseChain = promiseChain.then(function() {
          return self.set(k, v);
        }).catch(function (e) {
          // console.log("Caught error setting {", k, ":", v, "}: ", e);
          self.emit('error', e);
          return Q.fcall(function () {});
        });
      }
function (k, v) {
        promiseChain = promiseChain.then(function() {
          return self.set(k, v);
        }).catch(function (e) {
          // console.log("Caught error setting {", k, ":", v, "}: ", e);
          self.emit('error', e);
          return Q.fcall(function () {});
        });
      }
function ( k , v ) { promiseChain = promiseChain . then ( function ( ) { return self . set ( k , v ) ; } ) . catch ( function ( e ) { // console.log("Caught error setting {", k, ":", v, "}: ", e); self . emit ( 'error' , e ) ; return Q . fcall ( function ( ) { } ) ; } ) ; }
We have to artificially create a function context to hold the values so we make a closure function, assign the variables, and immediately call it.
We have to artificially create a function context to hold the values so we make a closure function assign the variables and immediately call it .