RSSAmplifier

Blog

sirre.al

sirre.alRSS feed ↗3 posts

Latest posts

Safe JSON in script tags: How not to break a site

<script> tags follow unintuitive parsing rules that can break a webpage in surprising ways. Fortunately, it’s relatively straightforward to escape JSON for script tags. Just do this You don’t have to take my word for it, the HTML standard recommends this type of escaping: The easiest and safest … is to always escape an ASCII […]

These types are not the same

When working with TypeScript types, the design of our types is important. One choice we often see is to define an interface, but many times a union is preferable to a single interface. Here are two types that can be used in similar ways, below I’ll explain why the union is often preferable: SessionDataMega is […]

Volta vs. nvm for JavaScript tooling

I work on several JavaScript projects that use nvm (Node Version Manager) for managing Node.js versions. I’ve recently started using Volta to replace nvm and have been very impressed. I’ll explain the differences between Volta and nvm, and why I’m excited about Volta. Volta’s benefits stem from these two enhancements: A note before we start […]