core-js-compat
Advanced tools
Changelog
Promise.allSettled
moved to stable ES, per July TC39 meetingPromise.any
moved to stage 2, .errors
property of AggregateError
instances made non-enumerable, per July TC39 meetingusing
statement proposal moved to stage 2, added Symbol.asyncDispose
, per July TC39 meetingArray.isTemplateObject
stage 2 proposal, per June TC39 meetingMap#updateOrInsert
stage 1 proposal, per July TC39 meetingMath.hypot
V8 7.7 bug, since it's still not stable without adding results to core-js-compat
Promise
, #579 - added .finally
and patched .then
to / on native Promise
prototype{ Map, Set, WeakMap, WeakSet }.deleteAll
DISABLE_OPENCOLLECTIVE
env variable to postinstall
scriptcore-js-pure
dependency from core-js-compat
, #590core-js-compat
on Windows, #606Changelog
Symbol.keyFor
complexity to O(1)
String.prototype.{ endsWith, includes, startsWith }
RegExp#flags
helper now respect dotAll
flag (mainly related to the pure
version)Changelog
String#matchAll
moved to stable ES, exposed Symbol.matchAll
, #516Promise.allSettled
moved to stage 3, #515String#replaceAll
moved to stage 2, behavior updated by the spec draft, #524Promise.any
moved to stage 1, #517es.regexp.flags
dependency from es.regexp.to-string
, #536, #537Object.{ assign, entries, values }
, #541Object.getOwnPropertySymbols
in Chrome 38 / 39, #539window.postMessage
-based task implementation uses location origin over '*'
, #542PromiseConstructor.resolve
only once in Promise
combinators, tc39/ecma262#1506core-js
dependency from core-js-compat
since it's required for missed at this moment featurepostinstall
Changelog
Object.fromEntries
(ECMAScript 2019)Symbol#description
(ECMAScript 2019)Set
methods (stage 2 proposal)
Set#difference
Set#intersection
Set#isDisjointFrom
Set#isSubsetOf
Set#isSupersetOf
Set#symmetricDifference
Set#union
Promise.allSettled
(stage 2 proposal)Array
(stage 1 proposal)
Array#lastItem
Array#lastIndex
String#replaceAll
(stage 1 proposal)String#codePoints
(stage 1 proposal)Map.groupBy
Map.keyBy
Map#deleteAll
Map#every
Map#filter
Map#find
Map#findKey
Map#includes
Map#keyOf
Map#mapKeys
Map#mapValues
Map#merge
Map#reduce
Map#some
Map#update
Set#addAll
Set#deleteAll
Set#every
Set#filter
Set#find
Set#join
Set#map
Set#reduce
Set#some
WeakMap#deleteAll
WeakSet#addAll
WeakSet#deleteAll
compositeKey
and compositeSymbol
methods (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 1 using
statement proposal)Promise.any
(with AggregateError
) (stage 0 proposal)URL
and URLSearchParam
from URL
standard, also stage 0 proposal to ECMAScript
URL
URL#href
URL#origin
URL#protocol
URL#username
URL#password
URL#host
URL#hostname
URL#port
URL#pathname
URL#search
URL#searchParams
URL#hash
URL#toString
URL#toJSON
URLSearchParams
URLSearchParams#append
URLSearchParams#delete
URLSearchParams#get
URLSearchParams#getAll
URLSearchParams#has
URLSearchParams#set
URLSearchParams#sort
URLSearchParams#toString
URLSearchParams#keys
URLSearchParams#values
URLSearchParams#entries
URLSearchParams#@@iterator
.forEach
method on iterable DOM collections (#329)Promise
rejection events (instead of only global handlers), #205.fetch
for correct with polyfilled Promise
and preventing problems like #178, #332, #371.@@isConcatSpreadable
to Array#concat
.@@species
to Array#{concat, filter, map, slice, splice}
..exec
calling to RegExp#{@@replace, @@split, @@match, @@search}
. Also, added fixes for RegExp#exec
method. #411, #434, #453, thanks @nicolo-ribaudo.Object#toString
does not support @@toStringTag
, add to wrapped prototypes own toString
method with @@toStringTag
logic, see #199.asap
(old stage 0 proposal) replaced by queueMicrotask
(a part of HTML spec)Observable
(#257, #276, etc.)Array#flatten
-> Array#flat
and Array#flatMap
global
stage 3 proposal - rename global
to globalThis
String#matchAll
(proposal-string-matchall#17, proposal-string-matchall#38, proposal-string-matchall#41, etc.) and move to the stage 3.name
properties of String#{trimStart, trimEnd , trimLeft, trimRight}
, move to the stage 3String#trim
(ES6 -> ES7)Array#{ flat, flatMap }
{ Array, %TypedArray% }#includes
Object.{ values, entries}
Object.getOwnPropertyDescriptors
String#{ padStart, padEnd }
String#{ trimStart, trimEnd, trimLeft, trimRight }
Promise#finally
Symbol.asyncIterator
Object#__(define|lookup)[GS]etter__
Error.isError
(withdrawn)System.global
and global
(replaced by globalThis
)Map#toJSON
and Set#toJSON
(rejected)RegExp.escape
(rejected)Reflect.enumerate
(removed from the spec)CSSRuleList
, MediaList
, StyleSheetList
Dict
Object.{classof, isObject, define, make}
Function#part
Number#@@iterator
String#{escapeHTML, unescapeHTML}
delay
.sham
flag to features which can't be properly polyfilled and / or not recommended for usage:
Symbol
constructor - we can't add new primitives. Object.prototype
accessors too expensive.Object.{create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors}
, Reflect.{defineProperty, getOwnPropertyDescriptor}
can't be properly polyfilled without descriptors support.Object.{freeze, seal, preventExtensions}
, Reflect.preventExtensions
can't be properly polyfilled in ES3 environment.Object.getPrototypeOf
can be deceived in ES3 environment.Reflect.construct
can't be polyfilled for a correct work with newTarget
argument on built-ins.URL
constructor in engines without descriptors support.WeakMap
frozen keys fallback, #384.Array#reverse
bug.core-js
repository structure to monorepo with packages in /packages/
directory.core-js-pure
package (replacement for core-js/library
).core-js-bundle
package.core-js
package, leave it only in core-js-builder
package.core-js@2
to:
core-js
packagecore-js-pure
packagebower.json
core-js/library
to separate core-js-pure
package.core-js/shim
entry point, replace it just with core-js
.core-js/es
, all those features in modules
folder has es.
prefix.es7.
to esnext.
, they no longer available in core-js/es7
, use core-js/stage/*
instead of that.core-js(/library)/fn
to core-js(-pure)/features
for improve readability./es/
path (for example, core-js/es/array/from
)./stable/
entry points as an equal of /features/
for stable features, without proposals./proposals/
entry points for allow include all features from one proposal (for example, core-js/proposals/reflect-metadata
)./es|stable|features/instance/
entry points for getting polyfill of the related method for passed instance (could be used in cases like babel-runtime
).core-js/es/typed-array/from
).es.symbol
module for loading only required features, for example, in MS Edge.web.dom
namespace to web.dom-collections
.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./modules/
directory by moving internal modules to /internals/
directory.core-js(/library)/fn/array/{pop, push, reverse, shift, unshift}
.core
object no longer available in the global version, entry points which previously returned it now returns globalThis
object. Also, don't set global core
property.core-js-compat
package with:
core-js
modules and API for getting a list of required core-js
modules by browserslist
query, #466.@babel/preset-env
).@babel/preset-env
).core-js-builder
package:
targets
option with browserslist
query.