MCPcopy Create free account
hub / github.com/anomalyco/opencode / splitBom

Function splitBom

packages/core/src/patch.ts:194–195  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

192 .replace(/…/g, "...")
193 .replace(/ /g, " ")
194const splitBom = (text: string) =>
195 text.startsWith("\uFEFF") ? { bom: true, text: text.slice(1) } : { bom: false, text }
196const stripHeredoc = (input: string) =>
197 input.match(/^(?:cat\s+)?<<['"]?(\w+)['"]?\s*\n([\s\S]*?)\n\1\s*$/)?.[2] ?? input

Callers 2

deriveFunction · 0.70
joinBomFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected