_read() — vue Function Reference
Architecture documentation for the _read() function in render-stream.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 04b43da9_1cb6_3849_9bca_737db9b5fd1b["_read()"] 72937d8d_7584_5ce7_99da_5d1f2e14e684["pushBySize()"] 04b43da9_1cb6_3849_9bca_737db9b5fd1b -->|calls| 72937d8d_7584_5ce7_99da_5d1f2e14e684 c2716e9b_80b9_d4a3_f67f_5dbe53455aef["tryRender()"] 04b43da9_1cb6_3849_9bca_737db9b5fd1b -->|calls| c2716e9b_80b9_d4a3_f67f_5dbe53455aef df2ef105_12cf_997a_f8bc_d8632f441a0a["tryNext()"] 04b43da9_1cb6_3849_9bca_737db9b5fd1b -->|calls| df2ef105_12cf_997a_f8bc_d8632f441a0a 7b3aa424_9089_4803_a4c7_86c4f80ba973["isTrue()"] 04b43da9_1cb6_3849_9bca_737db9b5fd1b -->|calls| 7b3aa424_9089_4803_a4c7_86c4f80ba973 a1f5b8ca_b6d5_6b24_155e_038685c97c85["isUndef()"] 04b43da9_1cb6_3849_9bca_737db9b5fd1b -->|calls| a1f5b8ca_b6d5_6b24_155e_038685c97c85 style 04b43da9_1cb6_3849_9bca_737db9b5fd1b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/render-stream.ts lines 79–99
_read(n: number) {
this.expectedSize = n
// it's possible that the last chunk added bumped the buffer up to > 2 * n,
// which means we will need to go through multiple read calls to drain it
// down to < n.
if (isTrue(this.done)) {
this.push(null)
return
}
if (this.buffer.length >= n) {
this.pushBySize(n)
return
}
if (isUndef(this.next)) {
// start the rendering chain.
this.tryRender()
} else {
// continue with the rendering.
this.tryNext()
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does _read() do?
_read() is a function in the vue codebase.
What does _read() call?
_read() calls 5 function(s): isTrue, isUndef, pushBySize, tryNext, tryRender.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free