Download node_modules/tiktoken/lite/init.js from xxsxx/cld: direct link, hf CLI and curl.
- Browser
- Download file 668 Bytes
-
https://huggingface.co/spaces/xxsxx/cld/resolve/main/node_modules/tiktoken/lite/init.js
- Command line
-
hf download hf://spaces/xxsxx/cld/node_modules/tiktoken/lite/init.js
-
curl -L -o init.js https://huggingface.co/spaces/xxsxx/cld/resolve/main/node_modules/tiktoken/lite/init.js
668 Bytes
| // @ts-expect-error | |
| import * as imports from "./tiktoken_bg"; | |
| let isInitialized = false; | |
| export async function init(callback) { | |
| if (isInitialized) | |
| return imports; | |
| const result = await callback({ "./tiktoken_bg.js": imports }); | |
| const instance = "instance" in result && result.instance instanceof WebAssembly.Instance | |
| ? result.instance | |
| : result instanceof WebAssembly.Instance | |
| ? result | |
| : null; | |
| if (instance == null) | |
| throw new Error("Missing instance"); | |
| imports.__wbg_set_wasm(instance.exports); | |
| isInitialized = true; | |
| return imports; | |
| } | |
| // @ts-expect-error | |
| export * from "./tiktoken_bg"; | |