MCPcopy Create free account
hub / github.com/Effect-TS/effect / append

Function append

packages/effect/src/internal/codegen.ts:8–15  ·  view source on GitHub ↗
(value: CodeHole, parts: Array<Fragment>)

Source from the content-addressed store, hash-verified

6}
7
8function append(value: CodeHole, parts: Array<Fragment>): void {
9 if (value === undefined || value === null || value === false || value === "") return
10 if (Array.isArray(value)) {
11 for (const item of value) append(item, parts)
12 } else {
13 parts.push(typeof value === "number" ? String(value) : value as Fragment)
14 }
15}
16
17/** @internal */
18export function code(strings: TemplateStringsArray, ...values: ReadonlyArray<CodeHole>): Fragment {

Callers 2

codeFunction · 0.70
joinFunction · 0.70

Calls 2

pushMethod · 0.65
StringFunction · 0.50

Tested by

no test coverage detected