@fabric-es/fabric-cqrs
Version:
Hyperledger Fabric middleware for event sourcing and cqrs pattern
11 lines • 590 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPaginated = void 0;
const getPaginated = (items, total, cursor) => ({
total,
items: items || [],
hasMore: (items === null || items === void 0 ? void 0 : items.length) ? cursor + (items === null || items === void 0 ? void 0 : items.length) < total : false,
cursor: (items === null || items === void 0 ? void 0 : items.length) ? cursor + (items === null || items === void 0 ? void 0 : items.length) : null,
});
exports.getPaginated = getPaginated;
//# sourceMappingURL=getPaginated.js.map