UNPKG

@shopware-ag/dive

Version:

Shopware Spatial Framework

2 lines (1 loc) 495 B
"use strict";var i=Object.defineProperty;var n=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var o=(e,t,r)=>n(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{constructor(t,r){o(this,"_uri","");this._loader=t,this._exporter=r}convert(t){return this._uri=t,{to:this._to.bind(this)}}async _to(t,r){const s=await this._loader.load(this._uri);return this._exporter.export(s,t,r)}}exports.AssetConverter=a;