UNPKG

unpak.js

Version:

Modern TypeScript library for reading Unreal Engine pak files and assets, inspired by CUE4Parse

22 lines 571 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Lazy = void 0; class Lazy { initializer = null; _value = null; constructor(initializer) { this.initializer = initializer; } get value() { if (this._value == null) { this._value = this.initializer != null ? this.initializer() : null; this.initializer = null; } return this._value; } get isInitialized() { return this._value !== null; } } exports.Lazy = Lazy; //# sourceMappingURL=Lazy.js.map