deploy: ebd4cc0010
This commit is contained in:
41
node_modules/shiki/dist/chunks/onig-56b7efa9.mjs
generated
vendored
41
node_modules/shiki/dist/chunks/onig-56b7efa9.mjs
generated
vendored
@@ -1,41 +0,0 @@
|
||||
function _loadWasmModule (sync, filepath, src, imports) {
|
||||
function _instantiateOrCompile(source, imports, stream) {
|
||||
var instantiateFunc = stream ? WebAssembly.instantiateStreaming : WebAssembly.instantiate;
|
||||
var compileFunc = stream ? WebAssembly.compileStreaming : WebAssembly.compile;
|
||||
|
||||
if (imports) {
|
||||
return instantiateFunc(source, imports)
|
||||
} else {
|
||||
return compileFunc(source)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var buf = null;
|
||||
if (filepath) {
|
||||
|
||||
return _instantiateOrCompile(fetch(filepath), imports, true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var raw = globalThis.atob(src);
|
||||
var rawLength = raw.length;
|
||||
buf = new Uint8Array(new ArrayBuffer(rawLength));
|
||||
for(var i = 0; i < rawLength; i++) {
|
||||
buf[i] = raw.charCodeAt(i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(sync) {
|
||||
var mod = new WebAssembly.Module(buf);
|
||||
return imports ? new WebAssembly.Instance(mod, imports) : mod
|
||||
} else {
|
||||
return _instantiateOrCompile(buf, imports, false)
|
||||
}
|
||||
}
|
||||
|
||||
function onig(imports){return _loadWasmModule(0, './onig.wasm', null, imports)}
|
||||
|
||||
export { onig as default };
|
||||
Reference in New Issue
Block a user