Spaces:
Paused
Paused
Download node_modules/@huggingface/hub/src/utils/hexFromBytes.ts from Leon4gr45/nova-header-nav: direct link, hf CLI and curl.
- Browser
- Download file 283 Bytes
-
https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/hexFromBytes.ts
- Command line
-
hf download hf://spaces/Leon4gr45/nova-header-nav/node_modules/@huggingface/hub/src/utils/hexFromBytes.ts
-
curl -L -o hexFromBytes.ts https://huggingface.co/spaces/Leon4gr45/nova-header-nav/resolve/main/node_modules/%40huggingface/hub/src/utils/hexFromBytes.ts
283 Bytes
| export function hexFromBytes(arr: Uint8Array): string { | |
| if (globalThis.Buffer) { | |
| return globalThis.Buffer.from(arr).toString("hex"); | |
| } else { | |
| const bin: string[] = []; | |
| arr.forEach((byte) => { | |
| bin.push(byte.toString(16).padStart(2, "0")); | |
| }); | |
| return bin.join(""); | |
| } | |
| } | |