Installation
Install core-js and its companion packages via npm, yarn, or pnpm.
Quick Start
Start polyfilling in minutes with a working code example.
Entry Points
Learn how to import only the features you need.
Babel Integration
Automate polyfill injection with @babel/preset-env and @babel/runtime.
What is core-js?
core-js is a modular standard library for JavaScript. It includes polyfills for:- ECMAScript up to ES2025 — Promise, Symbol, Map, Set, Iterator, TypedArrays, Array methods, String methods, Object methods, and hundreds more
- TC39 proposals — from finished proposals (already in the language) down through Stage 0 experiments
- Web standards — URL, URLSearchParams, structuredClone, queueMicrotask, setImmediate, DOMException, and iterable DOM collections
Choose your package
core-js
The global polyfill — patches built-in prototypes and constructors directly. Best for application code.
core-js-pure
Pollution-free variant — exports standalone functions without touching globals. Best for library authors.
core-js-compat
Compatibility data — get a list of required core-js modules for any browserslist target.
core-js-builder
Custom build — generate a targeted bundle with only the polyfills your environments need.
Explore the API
ECMAScript builtins
Object, Array, String, Number, Math, Date, Function, Error
Collections
Map, Set, WeakMap, WeakSet, WeakRef
Iterators
Iterator helpers, AsyncIterator, for-of support
Typed Arrays
Int8Array, Uint8Array, Float32Array, and all TypedArray methods
Promise
Promise, Promise.all, Promise.allSettled, Promise.any, Promise.try
Web Standards
URL, structuredClone, queueMicrotask, setImmediate, DOMException