Home / Function/ getStream() — fastify Function Reference

getStream() — fastify Function Reference

Architecture documentation for the getStream() function in inject.test.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  c08e72be_ae26_f66e_e874_874ef1d2f866["getStream()"]
  dd599558_530e_6536_323b_3a24aecd8b1b["inject.test.js"]
  c08e72be_ae26_f66e_e874_874ef1d2f866 -->|defined in| dd599558_530e_6536_323b_3a24aecd8b1b
  style c08e72be_ae26_f66e_e874_874ef1d2f866 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/inject.test.js lines 373–386

function getStream () {
  const Read = function () {
    Stream.Readable.call(this)
  }
  util.inherits(Read, Stream.Readable)
  const word = '{"hello":"world"}'
  let i = 0

  Read.prototype._read = function (size) {
    this.push(word[i] ? word[i++] : null)
  }

  return new Read()
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does getStream() do?
getStream() is a function in the fastify codebase, defined in test/inject.test.js.
Where is getStream() defined?
getStream() is defined in test/inject.test.js at line 373.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free