scheunemann-interfaces
Version:
Interfaces de Projetos Scheunemann
20 lines (19 loc) • 638 B
JavaScript
;
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)