MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / bytesToBase64url

Function bytesToBase64url

packages/worker-utils/src/hostname-label.ts:69–72  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

67const INSTANCE_LABEL_RE = /^i-([0-9a-f]{32})$/;
68const USER_LABEL_RE = /^u-([0-9a-v]+)$/;
69
70function base64urlToBytesOrNull(encoded: string): Uint8Array | null {
71 try {
72 const bytes = base64urlToBytes(encoded);
73 return bytesToBase64url(bytes) === encoded ? bytes : null;
74 } catch {
75 return null;

Callers 2

base64urlToBytesFunction · 0.70

Calls 2

joinMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected