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

Function joinBom

packages/core/src/file-mutation.ts:180–183  ·  view source on GitHub ↗
(text: string, bom: boolean)

Source from the content-addressed store, hash-verified

178}
179
180function joinBom(text: string, bom: boolean) {
181 const stripped = splitBom(text).text
182 return bom ? `\uFEFF${stripped}` : stripped
183}
184
185function hasUtf8Bom(content: Uint8Array) {
186 return content[0] === 0xef && content[1] === 0xbb && content[2] === 0xbf

Callers 1

file-mutation.tsFile · 0.70

Calls 1

splitBomFunction · 0.70

Tested by

no test coverage detected