Episode
The browser APIs you're shipping libraries to replace with Kilian Valkhof
- Podcast
- PodRocket
- Published
- Apr 2, 2026
- Duration seconds
- 2307
- Processing state
processed
Actions
POST https://stenobird.com/v1/public/podcasts/podrocket/episodes/the-browser-apis-you-re-shipping-libraries-to-replace-with-kilian-valkhof/transcription-requests
Idempotently request low-priority transcript generation for this episode.GET https://stenobird.com/podcast/podrocket/the-browser-apis-you-re-shipping-libraries-to-replace-with-kilian-valkhof.md
Read the agent-friendly Markdown representation of this episode resource.
Summary
Stop bloating your JavaScript bundles with heavy libraries like Moment.js or date-fns for simple formatting tasks. Learn how the native JavaScript Intl API provides powerful, locale-aware string formatting for dates, currencies, and lists without any extra download cost.
Topics
- JavaScript Intl API
- Web Development
- Browser APIs
- Internationalization
- Frontend Performance
- JavaScript Formatting
- Web Standards
- Software Engineering
Highlights
- Main idea: The Intl API is a built-in string formatting engine, not a logic library for date arithmetic
- Practical takeaway: Use the Segmenter API to handle complex word and emoji boundaries across 7,000+ locales
- Practical takeaway: Implement the Collator API to ensure alphabetical sorting respects language-specific rules like Spanish or Danish
- Failure mode: Avoid assuming the Intl API can perform date math or time zone conversions; it is strictly for outputting formatted strings
- Efficiency gain: Leveraging native browser APIs eliminates the bundle size and parsing overhead of third-party formatting libraries
Chapters
1:00Why Developers Overlook Internationalization: The misconception that internationalization is only necessary for multi-language sites, rather than a tool for localized formatting.3:55The Intl API as a Formatting Library: Understanding that the API functions as a powerful string formatter for dates, times, and locales.6:45The Limits of Intl: String Output Only: Clarifying that the API does not handle date logic or math, only the final string representation.9:30Replacing Heavy Dependencies: Comparing the native API to libraries like Moment.js, Luxon, and date-fns to reduce bundle bloat.12:25The Importance of Locale-Aware Currency: How subtle formatting differences, like currency symbol placement, impact user trust and experience.18:05The Evolution of Browser Specifications: How modern web standards are increasingly designed around actual developer use cases and implementation realities.27:00Modern UI Primitives: Popovers and Top Layer: Exploring new browser features like the Popover API and how they solve long-standing z-index and layout issues.32:35Advanced Formatting: Segmenter and Collator: Deep dive into using the Segmenter API for text parsing and the Collator API for linguistically correct sorting.