code: function streamify(promise, factory) {
    var _then = promise.then;
    promise.then = function() {
      factory();
      var newPromise = _then.apply(promise, arguments);
      return streamify(newPromise, factory);
    };
    promise.stream = factory;
    return promise;
  }
docs: Add stream() method to promise (and following promise chain), to access original request stream.
  @private