Platform
Resources
Pricing
Sign in
Contact us
Tom MacWright
hi!
Workspace
Fork
Published
JavaScript
By
Tom MacWright
Edited
Apr 3, 2018
1 star
Insert cell
Insert cell
makeSeriesStream
=
(
)
=>
new
ReadableStream
(
{
start
:
async
controller
=>
{
for
(
let
i
=
1
;
i
<=
countTo
;
i
++
)
{
controller
.
enqueue
(
i
)
;
await
Promises
.
delay
(
100
)
;
}
controller
.
close
(
)
;
}
}
)
Insert cell
makeSeriesStream
(
)
Insert cell
Insert cell
Generators
.
observe
(
change
=>
{
makeSeriesStream
(
)
.
pipeTo
(
new
WritableStream
(
{
write
(
chunk
)
{
change
(
chunk
)
;
}
}
)
)
;
}
)
Insert cell
Insert cell
{
yield
"Piping..."
;
await
makeSeriesStream
(
)
.
pipeTo
(
new
WritableStream
(
{
write
(
chunk
)
{
console
.
log
(
chunk
)
;
}
}
)
)
;
yield
"Done piping."
;
}
Insert cell
Insert cell
makeSeriesStream
(
)
.
getReader
(
)
.
read
(
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
makeSeriesStream
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ReadableStream
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
WritableStream
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
countTo
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML