MCPcopy Create free account
hub / github.com/Touffy/client-zip / encodeString

Function encodeString

src/utils.ts:3–3  ·  view source on GitHub ↗
(whatever: unknown)

Source from the content-addressed store, hash-verified

1export const makeBuffer = (size: number) => new DataView(new ArrayBuffer(size))
2export const makeUint8Array = (thing: any) => new Uint8Array(thing.buffer || thing)
3export const encodeString = (whatever: unknown) => new TextEncoder().encode(String(whatever))
4export const clampInt32 = (n: bigint) => Math.min(0xffffffff, Number(n))
5export const clampInt16 = (n: bigint) => Math.min(0xffff, Number(n))

Callers 4

normalizeInputFunction · 0.90
normalizeChunkFunction · 0.90
normalizeMetadataFunction · 0.90
normalizeNameFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…