UNPKG

@cf-wasm/og

Version:

Generate Open Graph Images dynamically from HTML/CSS without a browser.

35 lines (34 loc) 838 B
//#region src/core/modules.ts /** Modules */ var Modules = class { /** The {@link ResvgModule} */ get resvg() { if (!this._resvg) throw new Error("Module `resvg` is not set, set it before accessing."); return this._resvg; } set resvg(module) { this._resvg = module; } /** The {@link SatoriModule} */ get satori() { if (!this._satori) throw new Error("Module `satori` is not set, set it before accessing."); return this._satori; } set satori(module) { this._satori = module; } /** Sets modules */ set(resvgModule, satoriModule) { this.resvg = resvgModule; this.satori = satoriModule; } /** Ensures all the modules are set */ isUsable() { if (this._resvg && this._satori) return true; return false; } }; const modules = new Modules(); //#endregion export { modules }; //# sourceMappingURL=modules.js.map