Are you using GitHub as a poor CDN?
For example I could import my new VelociRouter project:
The GitHub URL is even versioned using a git tag. However, raw.githubusercontent.com is not a good CDN because it lacks appropriate cache headers and it serves code with a text/plain content type. Regardless, it’s still a useful place to publish […]
Did you know that JSON.stringify and JSON.parse can take more than one argument?
Perhaps like me you’ve done:
To output readable JSON with 2 space formatting — the correctly amount of whitespace. But what is that null all about? Surely I’ve researched this before and forgotten.
JSON basics
Standard JSON values include the primitives:
boolean
null
number
string
And then array and object collections […]
Static site generators are cool but they require a build step.
Frameworks like SvelteKit use Vite. For development, Vite basically does the build in the background. It caches and compiles to disk. It uses fancy tricks like hot module replacement to streamline the dev experience. Spicy. When it’s time to deploy to production there is a […]
I’ve updated my Deno Tail Lines module to improve performance. See my original blog post for a quick intro. Reading a file backwards is trickier than it sounds!
The Deno standard library has a new TextLineStream. This is a useful addition. However, If you only want the last ten lines, for example, you have to skip […]
I’ve only gone and published an XML parsing library!
It’s called XML Streamify on GitHub and it works like this:
This example outputs blog post titles from my RSS feed.
The parse function is an async generator in front of a custom TransformStream. parse will yield nodes as the XML document if fetched as parsed.
This allows you to […]
So I may have used the word “final” rather ambitiously when I blogged “The Final Off-Canvas Navigation?” two years ago. At least I left the door open with a question mark? I’ve since made big changes to the implementation.
The New (New) Version
Checkout my new demo on CodePen.
All the good stuff remains like focus state, keyboard […]
In my ongoing adventure to build a personal media web app I keep finding new web APIs to make it more awesome. I’ve adopted the Internationalization API for natural sorting and relative dates and the Media Session API for native integration.
Next I’m improving my use of file storage APIs to download and cache audio files […]