MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / textToData

Function textToData

lib/auth.ts:25–25  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

23const isUrlAnIp = (baseUrl: string) => /^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/.test(baseUrl);
24
25const textToData = (text: string) => new TextEncoder().encode(text);
26
27export const dataToText = (data: Uint8Array) => new TextDecoder().decode(data);
28

Callers 3

generateKeyFunction · 0.85
signAuthJwtFunction · 0.85
verifyAuthJwtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected