Features
Explore
About
Docs
Pricing
Log in
Sign up
Log in
Sign Up
cole
2 public vals
Joined
March 7, 2023
dailyCat
Script
v5
Fork
1
2
3
4
5
6
7
import
{
fetchCat
}
from
"https://esm.town/v/cole/fetchCat"
;
export
let
dailyCat
=
async
(
)
=>
{
const
url
=
fetchCat
(
)
;
const
html
=
`Here's a random cat: <img src="
${
url
}
">`
;
console
.
email
(
{
html
}
,
"random cat"
)
;
}
;
1
0
fetchCat
Script
v2
Fork
1
2
3
4
5
6
7
import
{
fetch
}
from
"https://esm.town/v/std/fetch"
;
export
let
fetchCat
=
async
(
)
=>
{
const
result
=
await
fetch
(
"https://aws.random.cat/meow"
)
;
const
json
=
await
result
.
json
(
)
;
return
json
.
file
;
}
;
1
0
Prev
Next
?