JSPM

readable-stream-node-to-web

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 27617
  • Score
    100M100P100Q153720F
  • License MIT

Converts a node Readable stream to a web ReadableStream

Package Exports

  • readable-stream-node-to-web

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (readable-stream-node-to-web) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

readable-stream-node-to-web Build Status npm

Convert a nodejs Readable stream to a web ReadableStream

Sauce Test Status

var nodeToWebStream = require('readable-stream-node-to-web');

var nodeStream = // Obtain a nodejs Readable stream
var webStream = nodeToWebStream(nodeStream);

nodeStream is a NodeJS Readable stream

webStream is a WhatWG web ReadableStream

This method takes a readable node stream and returns a web stream to reads from given the node stream. This allows the plethora of nodejs modules involving Readable streams to be used in a web context like using a node stream with FetchEvent.respondWith()

This module can be used with bundlers like browserify or webpack. This module is also written in es5 so there is no need for transpilation.

License

MIT. Copyright (c) Austin Middleton.