From the field notes
JavaScript.
JavaScript language details, browser behavior, and useful workarounds.
7 articles
JavaScript articles
Validating related fields with Zod
Validate dependent fields with Zod refinements, put useful errors next to the right input, and handle the antimeridian when checking geographical bounds.
4 min readYour own SSO provider using Better Auth
Build an OpenID Connect provider with Better Auth, use encrypted stateless client sessions across domains, and revalidate identity and permissions before writes.
12 min readReading query string values in JavaScript
To get anything useful from window.location.search you need to parse it in JavaScript to get individual values.
2 min readNon-blocking web fonts using LocalStorage
You want custom web fonts, but without the performance drawback? Read how to use a simple script to load base64 encoded web fonts in a non-blocking way and cache them in LocalStorage.
5 min readAlways catch LocalStorage security and quota exceeded errors
Why you should always catch LocalStorage errors, and a cross-browser solution to catch the quota exceeded error.
4 min readParsing emoji Unicode in JavaScript
JavaScript is limited in supporting emoji Unicode. This post describes the problem and a workaround.
7 min readIn JavaScript, almost anything is an expression
Article about JavaScript expressions, operators and operator precedence.
5 min read