UNPKG

cecon-interfaces

Version:
17 lines (16 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.factoryEnvelopeArrayPagination = void 0; // Creates an envelope containing an array of items with pagination support function factoryEnvelopeArrayPagination(items, offSet, limit, total, lastId) { var data = { offSet: offSet, limit: limit, itemsTotal: items.length, total: total || items.length, items: items, lastId: lastId, }; return data; // Consider returning a frozen copy for immutability } exports.factoryEnvelopeArrayPagination = factoryEnvelopeArrayPagination;