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

Method push

packages/effect/src/encoding/Xml.ts:2568–2575  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

2566 }
2567
2568 push(event: Event): void {
2569 const text = this.write(event)
2570 if (text.length > 0) {
2571 const out = this.out
2572 if (out.length > 0) out[0] += text
2573 else out.push(text)
2574 }
2575 }
2576
2577 end(): void {
2578 if (this.stack.length > 0) throw invalidEvent(`unclosed element <${this.stack[this.stack.length - 1]}>`)

Callers

nothing calls this directly

Calls 2

writeMethod · 0.95
pushMethod · 0.65

Tested by

no test coverage detected