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

Function join

packages/opencode/src/util/bom.ts:12–16  ·  view source on GitHub ↗
(text: string, bom: boolean)

Source from the content-addressed store, hash-verified

10}
11
12export function join(text: string, bom: boolean) {
13 const stripped = split(text).text
14 if (!bom) return stripped
15 return BOM + stripped
16}
17
18export const readFile = Effect.fn("Bom.readFile")(function* (fs: FSUtil.Interface, filePath: string) {
19 return split(new TextDecoder("utf-8", { ignoreBOM: true }).decode(yield* fs.readFile(filePath)))

Callers 15

bundleInputsFunction · 0.85
htmlFunction · 0.85
html.test.tsFile · 0.85
resolveCmdFunction · 0.85
resolveWindowsAppPathFunction · 0.85
index.tsFile · 0.85
initLoggingFunction · 0.85
initCrashReporterFunction · 0.85
startNetLogFunction · 0.85
exportDebugLogsFunction · 0.85
initRunDirectoryFunction · 0.85
cleanupFunction · 0.85

Calls 1

splitFunction · 0.70

Tested by 6

bundleInputsFunction · 0.68
htmlFunction · 0.68
tempRootFunction · 0.68
writeStoreFunction · 0.68
createMigrationsFolderFunction · 0.68
bundleInputsFunction · 0.68