tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

readable-stream-to-array.js (222B)


      1 'use strict';
      2 
      3 function readableStreamToArray(stream) {
      4  var array = [];
      5  var writable = new WritableStream({
      6    write(chunk) {
      7      array.push(chunk);
      8    }
      9  });
     10  return stream.pipeTo(writable).then(() => array);
     11 }