core-js
3.51.0 · 19 Oct 2026MIT100.8M / weekRepositoryHomepagenpmAtom feed
3.51.0 is the newest release of 3.x.
In short
3 removed71 new8 fixed26 changed
- Removed
Remove Mongolian vowel separator (U+180E) from the list of whitespaces for methods like
String#trim(ES6 -> ES7) - Removed
Remove deprecated array entry points:
core-js(/library)/fn/array/{pop, push, reverse, shift, unshift}. - Removed
Removed an option for generation bundle of a version without global namespace pollution - now it's an odd use case.
Release note
Features
Add new features:
Object.fromEntries(ECMAScript 2019)Symbol#description(ECMAScript 2019)New
Setmethods (stage 2 proposal)Set#differenceSet#intersectionSet#isDisjointFromSet#isSubsetOfSet#isSupersetOfSet#symmetricDifferenceSet#union
Promise.allSettled(stage 2 proposal)Getting last item from
Array(stage 1 proposal)Array#lastItemArray#lastIndex
String#replaceAll(stage 1 proposal)String#codePoints(stage 1 proposal)New collections methods (stage 1 proposal)
Map.groupByMap.keyByMap#deleteAllMap#everyMap#filterMap#findMap#findKeyMap#includesMap#keyOfMap#mapKeysMap#mapValuesMap#mergeMap#reduceMap#someMap#updateSet#addAllSet#deleteAllSet#everySet#filterSet#findSet#joinSet#mapSet#reduceSet#someWeakMap#deleteAllWeakSet#addAllWeakSet#deleteAll
compositeKeyandcompositeSymbolmethods (stage 1 proposal)Number.fromString(stage 1 proposal)Math.seededPRNG(stage 1 proposal)Symbol.patternMatch(for stage 1 pattern matching proposal)Symbol.dispose(for stage 1usingstatement proposal)Promise.any(withAggregateError) (stage 0 proposal)URLandURLSearchParamsfromURLstandard, also stage 0 proposal to ECMAScriptURL:
URL#hrefURL:
URL#originURL:
URL#protocolURL:
URL#usernameURL:
URL#passwordURL:
URL#hostURL:
URL#hostnameURL:
URL#portURL:
URL#pathnameURL:
URL#searchURL:
URL#searchParamsURL:
URL#hashURL:
URL#toStringURL:
URL#toJSONURLSearchParams:
URLSearchParams#appendURLSearchParams:
URLSearchParams#deleteURLSearchParams:
URLSearchParams#getURLSearchParams:
URLSearchParams#getAllURLSearchParams:
URLSearchParams#hasURLSearchParams:
URLSearchParams#setURLSearchParams:
URLSearchParams#sortURLSearchParams:
URLSearchParams#toStringURLSearchParams:
URLSearchParams#keysURLSearchParams:
URLSearchParams#valuesURLSearchParams:
URLSearchParams#entriesURLSearchParams:
URLSearchParams#@@iterator
.forEachmethod on iterable DOM collections
Improve existing features:
Add triggering unhandled
Promiserejection events (instead of only global handlers), #205.Wrap
fetchfor correct with polyfilledPromiseand preventing problems like #178, #332, #371.Add support of
@@isConcatSpreadabletoArray#concat.Add support of
@@speciestoArray#{concat, filter, map, slice, splice}.Add direct
.execcalling toRegExp#{@@replace, @@split, @@match, @@search}. Also, added fixes forRegExp#execmethod. #411, #434, #453, thanks @nicolo-ribaudo.Correct iterators prototypes chain, related #261.
Correct Typed Arrays prototypes chain, related #378.
Make the internal state of polyfilled features completely unobservable, #146.
Add validation of receiver's internal class to missed non-generic methods.
Fix descriptors of global properties.
In the version without global pollution, if
Object#toStringdoes not support@@toStringTag, add to wrapped prototypes owntoStringmethod with@@toStringTaglogic, see #199.
Update standard features and proposals:
asap(old stage 0 proposal) replaced byqueueMicrotask(a part of HTML spec)Update
Observable(#257, #276, etc.)Update
Array#flatten->Array#flatandArray#flatMapUpdate
globalstage 3 proposal - renameglobaltoglobalThisUpdate
String#matchAll(proposal-string-matchall#17, proposal-string-matchall#38, proposal-string-matchall#41, etc.) and move to the stage 3Update
.nameproperties ofString#{trimStart, trimEnd , trimLeft, trimRight}, move to the stage 3Remove Mongolian vowel separator (U+180E) from the list of whitespaces for methods like
String#trim(ES6 -> ES7)
Mark ES2016, ES2017, ES2018, ES2019 features as stable:
Array#{ flat, flatMap }{ Array, %TypedArray% }#includesObject.{ values, entries}Object.getOwnPropertyDescriptorsString#{ padStart, padEnd }String#{ trimStart, trimEnd, trimLeft, trimRight }Promise#finallySymbol.asyncIteratorObject#__(define|lookup)[GS]etter__
Remove obsolete features:
Error.isError(withdrawn)System.globalandglobal(replaced byglobalThis)Map#toJSONandSet#toJSON(rejected)RegExp.escape(rejected)Reflect.enumerate(removed from the spec)Unnecessary iteration methods from
CSSRuleList,MediaList,StyleSheetList
No more non-standard features, finally removed:
DictObject.{classof, isObject, define, make}Function#partNumber#@@iteratorString#{escapeHTML, unescapeHTML}delay
Add
.shamflag to features which can't be properly polyfilled and / or not recommended for usage:Symbolconstructor - we can't add new primitives.Object.prototypeaccessors too expensive.Object.{create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors},Reflect.{defineProperty, getOwnPropertyDescriptor}can't be properly polyfilled without descriptors support.Object.{freeze, seal, preventExtensions},Reflect.preventExtensionscan't be properly polyfilled in ES3 environment.Object.getPrototypeOfcan be deceived in ES3 environment.Reflect.constructcan't be polyfilled for a correct work withnewTargetargument on built-ins.Typed Array constructors polyfill is quite correct but too expensive.
URLconstructor in engines without descriptors support.
Bug and compatibility fixes:
Fix deoptimisation of iterators in V8, #377.
Fix import of property before constructor which should contain this property, #262.
Fix some cases of IE11
WeakMapfrozen keys fallback, #384.Fix non-enumerable integer keys issue because of Nashorn ~ JDK8 bug, #389.
One more fix for microtasks in iOS related #339.
Many other internal fixes and improvements.
Repository: Change
core-jsrepository structure to monorepo with packages in/packages/directory.Repository: Clean-up it, remove all possible duplicates, generated files, etc.
Packages: Extract a version without global namespace pollution to a separate
core-js-purepackage (replacement forcore-js/library).Packages: Leave only one pair of bundles (global, with all polyfills) and move it to
core-js-bundlepackage.Packages: Remove bundling logic from
core-jspackage, leave it only incore-js-builderpackage.Packages: Clean-up packages.
Packages: Because of all approaches, reduce size of packages from ~2mb for
core-js@2to:~500kb for
core-jspackage~440kb for
core-js-purepackage
Packages: Finally remove
bower.jsonCommonJS API, namespaces:
Add availability configuration of aggressiveness.
Move
core-js/libraryto separatecore-js-purepackage.Because of removing all non-standard features, we no longer need
core-js/shimentry point, replace it just withcore-js.Move all features from ES5, ES2015, ES2016, ES2017, ES2018 and ES2019 to one namespace for stable ES - it's available as
core-js/es, all those features inmodulesfolder hases.prefix.Change prefix for ES proposals from
es7.toesnext., they no longer available incore-js/es7, usecore-js/stage/*instead of that.Rename
core-js(/library)/fntocore-js(-pure)/featuresfor improve readability.Allow more granular inclusion of features from
/es/path (for example,core-js/es/array/from).Add
/stable/entry points as an equal of/features/for stable features, without proposals.Add
/proposals/entry points for allow include all features from one proposal (for example,core-js/proposals/reflect-metadata).Add
/es|stable|features/instance/entry points for getting polyfill of the related method for passed instance (could be used in cases likebabel-runtime).Split typed arrays polyfills. Now you can, for example, load only required method (for example,
core-js/es/typed-array/from).Extract well-known symbols definition from
es.symbolmodule for loading only required features, for example, in MS Edge.Rename
web.domnamespace toweb.dom-collections.Rename
es6.regexp.{match, replace, search, split}->es.string.{match, replace, search, split}- mainly it's fixes / adding support of well-known symbols to string methods, only in second place adding related methods to regexp prototype.Relax
/modules/directory by moving internal modules to/internals/directory.Remove deprecated array entry points:
core-js(/library)/fn/array/{pop, push, reverse, shift, unshift}.coreobject no longer available in the global version, entry points which previously returned it now returnsglobalThisobject. Also, don't set globalcoreproperty.Add some missing entry points.
Tools, tests, code quality:
Added
core-js-compatpackage with:Data about the necessity of
core-jsmodules and API for getting a list of requiredcore-jsmodules bybrowserslistquery, #466.Data which modules load by each entry point (mainly useful for tools like
@babel/preset-env).Data which modules added in minor versions (mainly useful for tools like
@babel/preset-env).
core-js-builderpackage:Added
targetsoption withbrowserslistquery.Removed an option for generation bundle of a version without global namespace pollution - now it's an odd use case.
Removed UMD wrapper from a generated code of bundles - we don't need it for a global polyfill.
Getting rid of LiveScript, usage another language in JS standard library looks strange and impedes usage of tools like ESLint:
Tests are rewritten to JS.
Scripts are rewritten to JS.
Babel with minimalistic config (which should work anywhere) used on tests.
ESLint used on tests and tools.
Source code refactored for improving readability.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.