UNPKG

unreal.js

Version:

A pak reader for games like VALORANT & Fortnite written in Node.JS

22 lines (21 loc) 578 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Lazy = void 0; class Lazy { constructor(initializer) { this.initializer = null; this._value = null; 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;