{"_id":"lambda-stream","_rev":"7-380de241a12b608f3ea09a769401d63a","name":"lambda-stream","dist-tags":{"latest":"0.6.0"},"versions":{"0.0.1":{"name":"lambda-stream","version":"0.0.1","author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.0.1","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"dist":{"shasum":"1e2589333bd27a78a54b37b6a6e6d99931d75301","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.0.1.tgz","fileCount":23,"integrity":"sha512-qrL56wmb9Gy96+MVOPACZimup3ThNxl4vDl6SRORK5ZWE4SPhEwNf+X3hN1UwoBvjLyT8zBd5HoVyeK9Lfn+AA==","signatures":[{"sig":"MEYCIQCvXDhpnryTWO/Gnkb7IEJKQXAOBH389Y+RZbAV36GuvwIhANcNSwE1r+WBpksPfs8UYU3KMZEKyXf6xgijmXqJoNBE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkR+IDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYGhAAhw2VbflaE4ingrBrdnGqHxT94fZsJxyaV/hmCp/qEN12A8Jg\r\nqvAC9922V/hZSwQLkjGysmsncka9YFY1bbGAJfzR49BcHSd5Qja4KdkA8euI\r\nCTKnUT3tJJ9VBiuIdgmxS/kOB1BbYMVpwcPuO5Y3XRGew1bYrbbNb6cK5veB\r\nBkkjt0Tip+UNcREVm5tujCNiaLpYZOAdzZBC16Vu/jorz7zOnigxH8AT36NF\r\nWcYVMC0YReutDS8oUUODfJFzR4BkMABbzrW8mCS7sWgj/RhO0l17DWA+/xnY\r\nyCglB5b3FXiAOgz5cLGCu1IJqtGrruVkIOqGzO61lPPyLAOUuH2MXKN/HTc6\r\niw1/f1oEs+P0P4RAe8pv1pke5GQINEe6fGgl+32T7azeEpDPuvIysXMHjUfe\r\ndL23N5mgwUY8n9No+ir7paABC57ojC3rl4RP4Jah2ATeBpe9KPzLVWf7W3+c\r\nXBj178YnHoFF0oBLtABYoRC02WmjFaJuTV4tB8uLxz6QzJhuHcKqDnGKQvSU\r\nwHXH1SuSSMBARfNXbwRqit5VtO/fDhfazjmgG/edjHLTidNSvm/rMERjV54x\r\nZzHfvhLR4A3cjP5grZ1tbgqkhf1N+fklD/IITJQ7i9TgH1674R4pugF1QO3I\r\nd8opq03MdOc6M9+vjfrAYZyEoVX+/WVVVMo=\r\n=FzFB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"17b469abfb02c2f47e97675757c4d0c9971b2daa","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"_npmVersion":"9.3.1","description":"This library adds types and local support for AWS Lambda Response Streaming. Locally, it'll buffer and return the entire response.","directories":{},"_nodeVersion":"19.5.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.4","@types/node":"^18.16.0"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.0.1_1682432515574_0.3192195599296159","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"lambda-stream","version":"0.1.0","keywords":["serverless","lambda","aws","stream"],"author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.1.0","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"homepage":"https://github.com/astuyve/lambda-stream#readme","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"dist":{"shasum":"29e9a1cc9a07ba8c7445d7568f69d7e51128b831","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.1.0.tgz","fileCount":10,"integrity":"sha512-jFapqQl04gG/AMqEttPX4GyWWYC+EEPgP/C8ua7PqaWU5yl4P/sB+rSjM3PHlq9qmKIHk3qwO4uWA+4tR1DccA==","signatures":[{"sig":"MEUCIAyqTXh1ExNikYSVBGY3bzqRHptPnQXg9hafdDqdI0/8AiEA391fBocAHhJtUy5yQdVlHLChSfz+tDrZY98hLyG5ghw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkTrSwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+MA/+LA8WjQx1N6AD3mnARJF7SiCDpBjVg9EARjcaRxeX6KZV/l0r\r\nvO73dU2DPW5bBS5iGhpWCPSV4eD9c2fQK5bAnLd+GW0PWaDKOut2Nnb5SG0Q\r\nBciHROjdsDkXfox+n7IUz5+mqpwfhYMf/8VuzxP2N68DhxSN+8ngnvQJAQQE\r\nBXjPfqZAgks9IcIbpmc2cXidcIlIttvOAaYnagjlDtaFaDCqj5dB6i+Xf2E0\r\nYqPO66l86PRFgEi54XGBuC5SjT58MYgwvi0rQGpJELRcmKTs2JtjnYnoeQr3\r\nl1xm7LfPpN1snXHoiP5nQ/lwhPq/14uIJ3tvtAclvJ7qZXVb2kkG2MyUqZIT\r\nKJc87GM9yKOek0iyARVCyvg0MBUwbIF+ng40tptQjQl63ZLklpzUua7S9AuE\r\nvkv3n9VxW3puznq2I4vT3nRVfHy8d4Q9zodWM3b9GfwB2MHJNFUIF05JskG9\r\nezLChLxdW+pqj8U5JnBIJFpjo1vs9yNSmysDjIWem2j4eKv/kt0c7iiQIO19\r\nboKkhSjyBjvjxzDv0wE7gfht8FcQUfeHr4g32k33T+L+CIwOy+g6spmPZi/5\r\n+BBa3qBceGKvd/nIGe81Y4qQiQDfpil81s9lXZv5wkv1Dy0EOiQY2JYjPB3B\r\nZgPGTgx8UfM6k2i6InaDnaWsFkPriXJ85Eo=\r\n=EF2l\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"400c89893de17385f7da71411003f230184bd373","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"repository":{"url":"git+https://github.com/astuyve/lambda-stream.git","type":"git"},"_npmVersion":"9.3.1","description":"awslambda.streamifyResponse, but locally and with typescript","directories":{},"_nodeVersion":"19.5.0","dependencies":{"jest":"^29.5.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-jest":"^29.1.0","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^18.16.0"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.1.0_1682879664042_0.3245535476815826","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"lambda-stream","version":"0.2.0","keywords":["serverless","lambda","aws","stream"],"author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.2.0","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"homepage":"https://github.com/astuyve/lambda-stream#readme","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"dist":{"shasum":"08e89dac1b29c61a2904a963727e4f7b06a5a14c","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.2.0.tgz","fileCount":10,"integrity":"sha512-VUkPD3p7hysAlTfZnxrDMj+v751xrB+ztKky87eSYXbJh6GAejRkZLyuJYOsQGJIvRZYt4OvPi+7ektu97C4oA==","signatures":[{"sig":"MEUCIQCWWmTyuoYYEbYfe3oXcoJhI5ZkE19ur1Nd4RN8kmLdDgIgVM1DYVbyiUuBhL9iguYWM6cxFYBHgiwy+XHvefymhtE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8797},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c5a25c559d4823b6141b26e8dda32a67fc6e5999","scripts":{"test":"jest","build":"tsc","format":"prettier --write ."},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"repository":{"url":"git+https://github.com/astuyve/lambda-stream.git","type":"git"},"_npmVersion":"9.3.1","description":"awslambda.streamifyResponse, but locally and with typescript","directories":{},"_nodeVersion":"19.5.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","prettier":"^2.8.8","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^18.16.0"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.2.0_1683469534895_0.918511825180734","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"lambda-stream","version":"0.3.0","keywords":["serverless","lambda","aws","stream"],"author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.3.0","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"homepage":"https://github.com/astuyve/lambda-stream#readme","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"dist":{"shasum":"4f4f8381dbdaa0a3148cfda54c61727e47ca3b29","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.3.0.tgz","fileCount":10,"integrity":"sha512-S3wxbcYwLO9h/FDgAYniFsLUQ+1I5dO+6Dh31SoHzEo0PeNI6hmqnH0ALyEIhIcIpQOKLY9F49XwtJ3tr9EO5w==","signatures":[{"sig":"MEYCIQDH6X/HdzpTZAe0sjKPC0Og8PfeWN4jR1nTDRFgDPosRwIhAMlK5c7AySbY5nR/JtFzSQlbkvCT8QwLJ38jFuohhWnv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9821},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"76fe5364758b1c87d22e461ccdfc9463b925e6e6","scripts":{"test":"jest","build":"tsc","format":"prettier --write ."},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"repository":{"url":"git+https://github.com/astuyve/lambda-stream.git","type":"git"},"_npmVersion":"9.3.1","description":"awslambda.streamifyResponse, but locally and with typescript","directories":{},"_nodeVersion":"19.5.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","prettier":"^2.8.8","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^18.16.0"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.3.0_1684868094627_0.3823311102553313","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"lambda-stream","version":"0.4.0","keywords":["serverless","lambda","aws","stream"],"author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.4.0","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"homepage":"https://github.com/astuyve/lambda-stream#readme","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"dist":{"shasum":"f2dda8ea35fb87417b0a058cd20bc28517800ab9","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.4.0.tgz","fileCount":10,"integrity":"sha512-l51Mxm5CDKJqVmRb77pN04AiWOdHjfbYE+ic9o/nE8oa/XOcfALvwQ8xtCwDi8S2pAUqoDCXJ/nXm10wD/B+ZA==","signatures":[{"sig":"MEUCIQD7+wV13dql+PrpvLZ8eOYN+q5j7kDCAGdnz0DziIoAvwIgcPI1Tqri5HnoQpP8qyYDTlkmpB49XgWAycrEvIAhuUY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9337},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"8474027114b01bc97d7392e069b66c6b03897582","scripts":{"test":"jest","build":"tsc","format":"prettier --write ."},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"repository":{"url":"git+https://github.com/astuyve/lambda-stream.git","type":"git"},"_npmVersion":"9.3.1","description":"awslambda.streamifyResponse, but locally and with typescript","directories":{},"_nodeVersion":"19.5.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","prettier":"^2.8.8","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^18.16.0"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.4.0_1687263046392_0.04441422573204412","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"lambda-stream","version":"0.5.0","keywords":["serverless","lambda","aws","stream"],"author":{"name":"AJ Stuyvenberg"},"license":"MIT","_id":"lambda-stream@0.5.0","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"homepage":"https://github.com/astuyve/lambda-stream#readme","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"dist":{"shasum":"7387359dabfa6161176fcade85eab34a4f52e5a3","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.5.0.tgz","fileCount":10,"integrity":"sha512-AaMXqUM+GcJ2OpNF2LI78jzbZ84rSckH+uKfstMQFqXDn+ZBLIkJgkUk+L0fuCGzw+LP5VToUxJKDfAbtLXSGw==","signatures":[{"sig":"MEQCIFgx28k0prN2wt6XcnFM6icndp5BczbGnJe5WudqYKexAiB9nLPbQ3NHegd4DUs1tXBYupSFjj1PtKKeHN/0lMt1tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10093},"jest":{"verbose":true,"transform":{".(ts|tsx)":"ts-jest"},"moduleFileExtensions":["ts","tsx","js"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"3f7ff216ff62ecf3a7cfe53310c2f10b5ceb02f9","scripts":{"test":"jest","build":"tsc","format":"prettier --write ."},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"repository":{"url":"git+https://github.com/astuyve/lambda-stream.git","type":"git"},"_npmVersion":"9.6.7","description":"awslambda.streamifyResponse, but locally and with typescript","directories":{},"_nodeVersion":"20.3.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","prettier":"^2.8.8","typescript":"^5.0.4","@types/jest":"^29.5.1","@types/node":"^18.16.0","@types/aws-lambda":"^8.10.119"},"_npmOperationalInternal":{"tmp":"tmp/lambda-stream_0.5.0_1689681607963_0.6060983126079786","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"lambda-stream","version":"0.6.0","description":"awslambda.streamifyResponse, but locally and with typescript","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/astuyve/lambda-stream.git"},"keywords":["serverless","lambda","aws","stream"],"scripts":{"test":"jest","build":"tsc","format":"prettier --write ."},"author":{"name":"AJ Stuyvenberg"},"license":"MIT","devDependencies":{"@types/aws-lambda":"^8.10.148","@types/jest":"^29.5.1","@types/node":"^18.16.0","jest":"^29.5.0","prettier":"^2.8.8","ts-jest":"^29.1.0","typescript":"^5.0.4"},"dependencies":{},"jest":{"verbose":true,"moduleFileExtensions":["ts","tsx","js"],"transform":{".(ts|tsx)":"ts-jest"}},"_id":"lambda-stream@0.6.0","gitHead":"200d9a2a51b58c117d3fd1b79dc809670e7626bd","bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"homepage":"https://github.com/astuyve/lambda-stream#readme","_nodeVersion":"22.4.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-S625+Jdil56zFOtfBt5r0snP8SIBY7fXn7pLKXQ8C6u9A5kNSuEWcEVC05QoDkvBLjMhwBeIUwVU6PoOB7ll5w==","shasum":"d6051a96f483c8f96a4739b9bf33c058e7f577d9","tarball":"https://registry.npmjs.org/lambda-stream/-/lambda-stream-0.6.0.tgz","fileCount":10,"unpackedSize":12079,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEpLcQh76ymX0LxzXyAunWfNBWCVq5k1BWvefX0sIkWcAiAE952yQB/O8PlLaDXvIbV83c7eEJkvHrvqH+meyChHaA=="}]},"_npmUser":{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"},"directories":{},"maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lambda-stream_0.6.0_1743022186170_0.5957039263249406"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-25T14:21:55.574Z","modified":"2025-03-26T20:49:46.727Z","0.0.1":"2023-04-25T14:21:55.789Z","0.1.0":"2023-04-30T18:34:24.197Z","0.2.0":"2023-05-07T14:25:35.065Z","0.3.0":"2023-05-23T18:54:54.869Z","0.4.0":"2023-06-20T12:10:46.625Z","0.5.0":"2023-07-18T12:00:08.106Z","0.6.0":"2025-03-26T20:49:46.345Z"},"bugs":{"url":"https://github.com/astuyve/lambda-stream/issues"},"author":{"name":"AJ Stuyvenberg"},"license":"MIT","homepage":"https://github.com/astuyve/lambda-stream#readme","keywords":["serverless","lambda","aws","stream"],"repository":{"type":"git","url":"git+https://github.com/astuyve/lambda-stream.git"},"description":"awslambda.streamifyResponse, but locally and with typescript","maintainers":[{"name":"aj.stuyvenberg","email":"astuyve@gmail.com"}],"readme":"# Lambda-Stream\n\nThis library adds types and local support for AWS Lambda Response Streaming. Locally, it'll buffer and return the entire response.\n\nIn AWS Lambda, it'll simply use the global `awslambda.streamifyResponse`.\n\nThis library exposes a `ResponseStream` class, the `streamifyResponse` method, and `isInAWS` method. Types are also included.\n\n## Why?\n\nAWS added Lambda Response Streaming directly into the NodeJS runtime as a global method, instead of providing it with the AWS-SDK.\n\nThis makes functions leveraging Lambda Response Streaming difficult to test, run locally, or even write Lambda functions using a typical editor. Magic, runtime-only methods are a drag on developer experience!\n\nSo I wrote this library to fill that gap\n\n## End of Life\n\nThis library shouldn't exist.\n\nIf or when AWS decides to release and support a library which makes AWS Lambda Streaming Responses usable and testable locally, I'll happily archive this project.\n\n## Examples\n\nWorks like this:\n\n```typescript\nimport { APIGatewayProxyEventV2 } from 'aws-lambda'\nimport { streamifyResponse, ResponseStream } from 'lambda-stream'\n\nexport const handler = streamifyResponse(myHandler)\n\nasync function myHandler(\n  event: APIGatewayProxyEventV2,\n  responseStream: ResponseStream\n): Promise<void> {\n  console.log('Handler got event:', event)\n  return new Promise((resolve, reject) => {\n    responseStream.setContentType('text/plain')\n    responseStream.write('Hello')\n    setTimeout(() => {\n        responseStream.write('World')\n        responseStream.end()\n        resolve()\n    }, 1000)\n  })\n}\n```\n\nOr in commonjs:\n\n```javascript\n'use strict'\nconst { streamifyResponse } = require('lambda-stream')\n\nmodule.exports.hello = streamifyResponse(\n  async (event, responseStream, context) => {\n    responseStream.setContentType('text/plain')\n    responseStream.write('Hello, world!')\n    responseStream.end()\n  }\n)\n```\n\nPipelining is also supported:\n\n```javascript\nconst pipeline = require('util').promisify(require('stream').pipeline)\nconst { Readable } = require('stream')\nconst { streamifyResponse } = require('lambda-stream')\n\nconst handler = async (event, responseStream, _context) => {\n  // As an example, convert event to a readable stream.\n  requestStream = Readable.from(Buffer.from(JSON.stringify({ hello: 'world' })))\n\n  await pipeline(requestStream, zlib.createGzip(), responseStream)\n}\n\nmodule.exports.gzip = streamifyResponse(handler)\n```\n\n## Headers, Status Code\nAWS provides a helper function which allows you to specify additional headers, as well as craft the status code.\n\n```javascript\nconst { streamifyResponse } = require('lambda-stream')\nconst stream = require('stream')\nmodule.exports.hello = streamifyResponse(\n  async (event, responseStream, context) => {\n    const metadata = {\n      statusCode: 200,\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"CustomHeader\": \"outerspace\"\n      }\n    };\n    \n    // Use global helper to pass metadata and status code\n    responseStream = awslambda.HttpResponseStream.from(responseStream, metadata);\n\n    responseStream.write(\"Streaming with Helper \\n\");\n    await new Promise(r => setTimeout(r, 1000));\n    responseStream.write(\"Hello 0 \\n\");\n    await new Promise(r => setTimeout(r, 1000));\n    responseStream.write(\"Hello 1 \\n\");\n    await new Promise(r => setTimeout(r, 1000));\n    responseStream.write(\"Hello 3 \\n\");\n    responseStream.end();\n    // Suggested in Documentation: https://docs.aws.amazon.com/lambda/latest/dg/response-streaming-tutorial.html\n    // But NOT defined in node 16 or node 18\n    // Only defined in node 14\n    await responseStream.finished();\n  }\n);\n```\n\nWe are considering shimming our own helper to support types as well.\n\n## Contributors\n[AJ Stuyvenberg](https://github.com/astuyve)\n\n[Luka Matic](https://github.com/maticluka999)\n\n[Paulo Ricardo Xavier Giusti](https://github.com/prxg22)\n","readmeFilename":"README.md"}