MCPcopy Create free account
hub / github.com/cloudflare/computer / stripBom

Function stripBom

packages/computer/src/tools/fs/edit-diff.ts:28–32  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

26}
27
28export function stripBom(content: string): { bom: string; text: string } {
29 return content.startsWith("\uFEFF")
30 ? { bom: "\uFEFF", text: content.slice(1) }
31 : { bom: "", text: content };
32}
33
34// ---------- fuzzy matching ----------
35

Callers 1

createEditToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected