export const createAssetLoad = (url) => {
    return async (name) => {
        const cdnUrl = url.toString();
        const wasmUrl = cdnUrl + '/' + name;
        const response = await fetch(wasmUrl);
        if (response.status >= 400) {
            throw new Error(`Error fetching ${response.status}`);
        }
        return new Uint8Array(await response.arrayBuffer());
    };
};
//# sourceMappingURL=web.js.map