Sign in
webkit
/
WebKit
/
8080f6fee45a125d4786642fbf1a845df358d5c0
/
.
/
LayoutTests
/
imported
/
w3c
/
web-platform-tests
/
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
);
}