TL;DR: The browser caught up while you weren't looking. As of 2026, all 13 of these APIs are Baseline — supported across every major browser — so you can finally delete moment, lodash, axios, uuid, numeral, clipboard.js and more. Running tally at the bottom: ~115 KB gzipped, gone. Copy-paste code for each.
You keep reaching for a package out of muscle memory. But "Baseline" now means these APIs work everywhere that matters — so the dependency you're about to install is dead weight. Here's what you can delete today, with the bundle savings for each. structuredClone() → delete lodash.clonedeep (−5 KB)
JSON.parse(JSON.stringify(x)) silently mangles Date, Map, Set, and undefined. The platform has a real deep clone:
Handles Maps, Sets, Dates, typed arrays, and circular refs. (Caveats in Gotchas.) crypto.randomUUID() → delete uuid (−1 KB)
Spec-compliant v4, cryptographically random. Only needs a secure context (HTTPS or localhost) — which you already have. Intl.RelativeTimeFormat + a 6-line helper → delete moment (−72 KB)
This is the big one. Moment does compute the delta and pick the unit for you — the native API doesn't, so pair it with a tiny helper (this is the part everyone trips on):
numeric: "auto" gives you "yesterday" for free, localized in every language the browser ships — no locale bundles. Intl.NumberFormat → delete numeral.js (−3.6 KB)
Currency, units, and compact notation, all localized: URLSearchParams → delete query-string (−4 KB)
Handles encoding and repeated keys. (It does not do qs-style nested objects — see Gotchas.) navigator.clipboard → delete clipboard.js (−2.5 KB)
One line, returns a Promise. Secure context required, and it must run from a user gesture (a click handler). → delete your modal library (−5 KB)
Focus trap, backdrop, Esc-to-close, focus restore — all native: IntersectionObserver → delete lazy-load / infinite-scroll libs (−4 KB)
Same API powers lazy images, infinite scroll, and scroll animations — off the main thread. ResizeObserver → delete element-resize libraries (−2 KB)
For pure styling, CSS container queries now cover a lot of this too. AbortController → delete axios cancel tokens (−13 KB)
fetch covers most of what people import axios for — including cancellation and timeouts:
Native isn't a drop-in every time. The honest caveats: Intl.RelativeTimeFormat doesn't do the math. It formats a value+unit you give it — it won't compute "how long ago" or auto-pick the unit. That's why #3 ships a helper. If you have dozens of relative-time formats with fuzzy rules, a 2KB lib may still earn its place. URLSearchParams is flat. No qs-style nested/bracket parsing (?filter[status]=open&tags[]=a). Deep query objects → keep qs. structuredClone drops the un-cloneable. Functions, DOM nodes, class prototypes (you get a plain object back), and getters/setters don't survive. It's for data, not live instances. Object.groupBy and AbortSignal.any() are the newest here — Baseline, but only since 2024 (Safari 17.4+, recent Chrome/Firefox). If you support older browsers, feature-detect or polyfill these two specifically. Clipboard & UUID need a secure context; clipboard also needs a user gesture. Fine in prod, annoying on plain-HTTP dev boxes.
| Deleted | ~KB gzipped | |---|---| | moment | 72 | | axios | 13 | | lodash (clonedeep + groupBy) | 7 | | modal lib | 5 | | lazy-load lib | 4 | | query-string | 4 | | numeral.js | 3.6 | | clipboard.js | 2.5 | | resize lib | 2 | | emitter + media-query libs | 2 | | uuid | 1 | | Total | ~115 KB |
\ 72 KB = moment's default all-locales bundle; ~18 KB core-only. Even at core-only, it's a dependency you no longer need. All KB figures are gzipped, sourced from bundlephobia.com (Aug 2026) — audit any of them yourself.
That's ~115 KB of gzipped JavaScript your users no longer download — and 11 fewer things in npm audit. Before your next npm install, spend 60 seconds asking the 2026 question: did the platform already ship this at Baseline? More often than not now, it did.
