MCPcopy Index your code
hub / github.com/CodeGenieApp/serverless-express / addData

Function addData

src/response.js:22–28  ·  view source on GitHub ↗
(stream, data)

Source from the content-addressed store, hash-verified

20}
21
22function addData (stream, data) {
23 if (Buffer.isBuffer(data) || typeof data === 'string' || data instanceof Uint8Array) {
24 stream[BODY].push(Buffer.from(data))
25 } else {
26 throw new Error(`response.write() of unexpected type: ${typeof data}`)
27 }
28}
29
30module.exports = class ServerlessResponse extends http.ServerResponse {
31 static from (res) {

Callers 1

constructorMethod · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…