@gabrielrufino/cube
Version:
Data structures made in Typescript
33 lines (32 loc) • 1.08 kB
JavaScript
;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var DataStructure = /** @class */ (function () {
function DataStructure(inputs) {
this._data = __spreadArray([], inputs, true);
}
Object.defineProperty(DataStructure.prototype, "data", {
get: function () {
return __spreadArray([], this._data, true);
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataStructure.prototype, "size", {
get: function () {
return this._data.length;
},
enumerable: false,
configurable: true
});
return DataStructure;
}());
exports.default = DataStructure;