mirror of
https://github.com/servo/servo
synced 2026-05-11 09:26:59 +02:00
13 lines
226 B
JavaScript
13 lines
226 B
JavaScript
'use strict';
|
|
|
|
function readableStreamFromArray(array) {
|
|
return new ReadableStream({
|
|
start(controller) {
|
|
for (let entry of array) {
|
|
controller.enqueue(entry);
|
|
}
|
|
controller.close();
|
|
}
|
|
});
|
|
}
|