docs: function Demux(refs, limit) {
  
    if (!(this instanceof Fireproof.Demux)) {
      return new Fireproof.Demux(refs);
    } else if (arguments.length > 1 && !Array.isArray(refs)) {
      refs = Array.prototype.slice.call(arguments, 0);
    }
  
    this._limit = (limit !== undefined ? limit : true);
    this._refs = refs;
    this._positions = refs.reduce(function(positions, ref) {
  
      positions[ref.ref().toString()] = {
        name: undefined,
        priority: undefined
      };
  
      return positions;
  
    }, {});
  
    // we always want there to be a "previous" promise to hang operations from
    this._previousPromise = Fireproof.Promise.resolve([]);
  
    this._buffer = [];
  
  }