Spaces:
Paused
Paused
Download node_modules/@peculiar/utils/build/esm/encoding/utf8.js from Leon4gr45/augmenttoolkit: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/main/node_modules/%40peculiar/utils/build/esm/encoding/utf8.js
- Command line
-
hf download hf://spaces/Leon4gr45/augmenttoolkit/node_modules/@peculiar/utils/build/esm/encoding/utf8.js
-
curl -L -o utf8.js https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/main/node_modules/%40peculiar/utils/build/esm/encoding/utf8.js
281 Bytes
| import { toUint8Array } from "../bytes/index.js"; | |
| export function encode(text) { | |
| return new TextEncoder().encode(text); | |
| } | |
| export function decode(data) { | |
| return new TextDecoder("utf-8", { fatal: false }).decode(toUint8Array(data)); | |
| } | |
| export const utf8 = { encode, decode }; | |