@altostra/core
Version:
Core library for shared types and logic
1 lines • 669 B
JavaScript
;var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{s(i.next(e))}catch(e){a(e)}}function l(e){try{s(i.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,l)}s((i=i.apply(e,t||[])).next())}))};function getAllPages({getPage:e,getCursor:t,appendPage:n,hasNext:i}){return __awaiter(this,void 0,void 0,(function*(){let o,a;i=null!=i?i:e=>void 0!==e;do{const i=yield e(a);o=n(o,i),a=t(i)}while(i(a));return o}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllPages=void 0,exports.getAllPages=getAllPages;