3 ms·
I didn't know you could do this with fetch() and a data: URI: fetch('data:;base64,1ZpLsgIxCEXnrM...==').then( r => r.body.pipeThrough(new DecompressionSt
by simonw 4mo ago
I didn't know you could do this with fetch() and a data: URI:
fetch('data:;base64,1ZpLsgIxCEXnrM...==').then(
r => r.body.pipeThrough(new DecompressionStream('deflate-raw'))
).then(
s => new Response(s).text()
).then(
t => b.innerHTML = '<pre style=font-size:.65vw>' + t
)
- gabrielsroka 3mo agou don't need the first .then: https://github.com/piwodlaiwo/smallest-world-map/pull/1 https://github.com/piwodlaiwo/smallest-world-map/pull/1 mine is shorter