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
Canonical source
http://podrocket.logrocket.com/the-browser-apis-youre-shipping-libraries-to-replace-with-kilian-valkhof
Audio
https://dts.podtrac.com/redirect.mp3/aphid.fireside.fm/d/1437767933/3911462c-bca2-48c2-9103-610ba304c673/72dcf3b2-7f73-40ae-8163-c70e0c969cf4.mp3
JSON
/v1/public/podcasts/podrocket/episodes/the-browser-apis-you-re-shipping-libraries-to-replace-with-kilian-valkhof
Markdown
/podcast/podrocket/the-browser-apis-you-re-shipping-libraries-to-replace-with-kilian-valkhof.md

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. 1:00 Why Developers Overlook Internationalization: The misconception that internationalization is only necessary for multi-language sites, rather than a tool for localized formatting.
  2. 3:55 The Intl API as a Formatting Library: Understanding that the API functions as a powerful string formatter for dates, times, and locales.
  3. 6:45 The Limits of Intl: String Output Only: Clarifying that the API does not handle date logic or math, only the final string representation.
  4. 9:30 Replacing Heavy Dependencies: Comparing the native API to libraries like Moment.js, Luxon, and date-fns to reduce bundle bloat.
  5. 12:25 The Importance of Locale-Aware Currency: How subtle formatting differences, like currency symbol placement, impact user trust and experience.
  6. 18:05 The Evolution of Browser Specifications: How modern web standards are increasingly designed around actual developer use cases and implementation realities.
  7. 27:00 Modern 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.
  8. 32:35 Advanced Formatting: Segmenter and Collator: Deep dive into using the Segmenter API for text parsing and the Collator API for linguistically correct sorting.