Platform
Resources
Pricing
Sign in
Get started
Tom Larkworthy
Tech Lead at Taktile. Formerly Firebase, Google
Workspace
Fork
Public
By
Tom Larkworthy
Edited
May 26
1 fork
1 star
Insert cell
Insert cell
viewof
triggerFile
=
Inputs
.
button
(
"choose directory"
)
Insert cell
files
=
{
triggerFile
;
return
Array
.
fromAsync
(
(
await
window
.
showDirectoryPicker
(
)
)
.
entries
(
)
)
;
}
Insert cell
Insert cell
Insert cell
Insert cell
Inputs
.
table
(
await
Promise
.
all
(
files
.
map
(
async
(
[
name
,
handle
]
)
=>
{
const
file
=
await
handle
.
getFile
(
)
;
const
text
=
await
file
.
text
(
)
;
return
{
name
,
content
:
text
.
slice
(
0
,
100
)
}
;
}
)
)
)
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
triggerFile
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
files
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML