Can we add a param to enable us to convert this:
if (self.from >= self.total) { self._next = false; // we got them all. }
into this:
if (self.from >= self.total || (self.max >= 0 && self.from >= self.max)) { self._next = false; // we got them all. }
perhaps:
function ReadableHits(queryExec, parseHit) { .... this.max = queryExec.max || -1; }
Can we add a param to enable us to convert this:
if (self.from >= self.total) { self._next = false; // we got them all. }into this:
if (self.from >= self.total || (self.max >= 0 && self.from >= self.max)) { self._next = false; // we got them all. }perhaps:
function ReadableHits(queryExec, parseHit) { .... this.max = queryExec.max || -1; }