Skip to content
1 min read · 51 words

Variable: encodeTextTool

ts
const encodeTextTool: Tool<SpooledArtifact>;

Defined in: batteries/tools/encoding/index.ts:37

Encode or decode text using common schemes: base64, url (percent-encoding), html_entities.

Remarks

base64 uses the portable globalThis.btoa/atob pair so the tool works in browsers, Node, and edge runtimes. Encoding/decoding errors are returned as Error: strings rather than thrown so the model can react in-line.