Comparing version 12.17.0 to 12.17.1
@@ -5,3 +5,3 @@ "use strict"; | ||
const Namespaces_1 = require("./Namespaces"); | ||
exports.VERSION = '12.17.0'; | ||
exports.VERSION = '12.17.1'; | ||
// ==================================================================== | ||
@@ -8,0 +8,0 @@ // Frequently Used Values |
@@ -9,2 +9,3 @@ import { Paging } from '../protocol/xep0059'; | ||
direction?: 'forward' | 'backward'; | ||
reverse?: boolean; | ||
before?: string; | ||
@@ -19,2 +20,3 @@ after?: string; | ||
private direction; | ||
private reverse; | ||
private pageSize; | ||
@@ -21,0 +23,0 @@ constructor(opts: RSMOptions<T>); |
@@ -6,7 +6,8 @@ "use strict"; | ||
constructor(opts) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
this.cursor = { first: opts.before, last: opts.after }; | ||
this.query = opts.query; | ||
this.direction = (_a = opts.direction) !== null && _a !== void 0 ? _a : 'forward'; | ||
this.pageSize = (_b = opts.pageSize) !== null && _b !== void 0 ? _b : 20; | ||
this.reverse = (_b = opts.reverse) !== null && _b !== void 0 ? _b : this.direction === 'backward'; | ||
this.pageSize = (_c = opts.pageSize) !== null && _c !== void 0 ? _c : 20; | ||
} | ||
@@ -34,2 +35,5 @@ async *[Symbol.asyncIterator]() { | ||
this.cursor = paging; | ||
if (this.reverse) { | ||
results.reverse(); | ||
} | ||
return results; | ||
@@ -36,0 +40,0 @@ } |
{ | ||
"name": "stanza", | ||
"description": "Modern XMPP in the browser, with a JSON API", | ||
"version": "12.17.0", | ||
"version": "12.17.1", | ||
"author": "Lance Stout <lancestout@gmail.com>", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/legastero/stanza/issues", |
Sorry, the diff of this file is too big to display
1293314
35862