spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / hooks / context / remote-hash-of / hex-of / hex-of.ts
12 lines · 309 BRaw
1import { HEX_RADIX } from './hex-radix'
2
3/**
4 * A buffer's bytes as lowercase hex, two digits each.
5 *
6 * @param buffer the bytes
7 * @returns the hex text
8 */
9export const hexOf = (buffer: ArrayBuffer) =>
10 [...new Uint8Array(buffer)]
11 .map(byte => byte.toString(HEX_RADIX).padStart(2, '0'))
12 .join('')