MCPcopy
hub / github.com/vuejs/core / pipeToNodeWritable

Function pipeToNodeWritable

packages/server-renderer/src/renderToStream.ts:126–143  ·  view source on GitHub ↗
(
  input: App | VNode,
  context: SSRContext | undefined = {},
  writable: Writable,
)

Source from the content-addressed store, hash-verified

124}
125
126export function pipeToNodeWritable(
127 input: App | VNode,
128 context: SSRContext | undefined = {},
129 writable: Writable,
130): void {
131 renderToSimpleStream(input, context, {
132 push(content) {
133 if (content != null) {
134 writable.write(content)
135 } else {
136 writable.end()
137 }
138 },
139 destroy(err) {
140 writable.destroy(err)
141 },
142 })
143}
144
145export function renderToWebStream(
146 input: App | VNode,

Callers 1

pipeToWritableFunction · 0.90

Calls 1

renderToSimpleStreamFunction · 0.85

Tested by 1

pipeToWritableFunction · 0.72