UNPKG

xcom2charpool

Version:

Library for reading, manipulating, and managing XCOM 2 character pool binary files, supporting both browser and Node.js environments.

14 lines (13 loc) 548 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArrayOfStructs = void 0; const StructProperty_1 = require("../Properties/StructProperty"); class ArrayOfStructs { static from(array, elementsType, factory) { return new this(array, elementsType, factory); } constructor(array, elementsType, factory) { this.items = Array.from({ length: array.length }, () => StructProperty_1.StructProperty.from(array.reader, elementsType, 0, factory)); } } exports.ArrayOfStructs = ArrayOfStructs;