MCPcopy Create free account
hub / github.com/Streamerbot/client / hexToBase64

Function hexToBase64

packages/client/src/ws/util/websocket.util.ts:83–92  ·  view source on GitHub ↗
(hexString: string)

Source from the content-addressed store, hash-verified

81 return base64String;
82}
83
84/**
85 * Creates a promise that resolves when a matching custom event is received
86 *
87 * @param options.eventName Name to match in the custom event
88 * @param options.timeout Maximum time to wait for response in milliseconds
89 * @param options.addEventListener Function to add the event listener
90 * @param options.removeEventListener Function to remove the event listener
91 * @returns A tuple with [requestId, promise] where requestId should be sent with the request and promise resolves with the event data
92 */
93export function withCustomEventResponse<T = Record<string, any>>({
94 timeout = 10_000,
95 addEventListener,

Callers 1

sha256base64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected