UNPKG

scheunemann-interfaces

Version:
20 lines (19 loc) 638 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.factoryEnvelopeArray = void 0; // #region Functions (1) // Interface for envelope array structure // Creates an envelope containing an array of items, handling empty arrays function factoryEnvelopeArray(items) { if (items === void 0) { items = []; } var data = { offSet: 0, limit: 0, itemsTotal: items.length, total: items.length, items: items, }; return data; // Consider returning a frozen copy for immutability } exports.factoryEnvelopeArray = factoryEnvelopeArray; // #endregion Functions (1)