Sign in
nest-open-source
/
manifest_repos
/
chromium_src
/
1389d67935ffbffe8a70c1fa06867f6cf7ecf464
/
.
/
chromium
/
src
/
third_party
/
blink
/
web_tests
/
external
/
wpt
/
encoding
/
streams
/
resources
/
readable-stream-to-array.js
blob: fda03e2264492296d9b26986d15211384a6a8b16 [
file
] [
log
] [
blame
]
'use strict'
;
function
readableStreamToArray
(
stream
)
{
var
array
=
[];
var
writable
=
new
WritableStream
({
write
(
chunk
)
{
array
.
push
(
chunk
);
}
});
return
stream
.
pipeTo
(
writable
).
then
(()
=>
array
);
}