// Hardcoded module "node:stream/consumers" / "readable-stream/consumer" const { Bun } = $lazy("primordials"); export const arrayBuffer = Bun.readableStreamToArrayBuffer; export const text = Bun.readableStreamToText; export const json = stream => Bun.readableStreamToText(stream).then(JSON.parse); export const buffer = async readableStream => { return new Buffer(await arrayBuffer(readableStream)); }; export const blob = Bun.readableStreamToBlob; export default { [Symbol.for("CommonJS")]: 0, arrayBuffer, text, json, buffer, blob, }; main'>index : bun
Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/globals.test.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-04-29wipGravatar Jarred Sumner 10-16/+312
2022-04-29commit moreGravatar Jarred Sumner 3-0/+81