MCPcopy
hub / github.com/anomalyco/opencode / split

Function split

packages/opencode/src/util/bom.ts:7–10  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

5const BOM = String.fromCharCode(BOM_CODE)
6
7export function split(text: string) {
8 if (text.charCodeAt(0) !== BOM_CODE) return { bom: false, text }
9 return { bom: true, text: text.slice(1) }
10}
11
12export function join(text: string, bom: boolean) {
13 const stripped = split(text).text

Callers 2

joinFunction · 0.70
bom.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected