From 331e19d7b0aacee41eedc8a638839b8f9cdc82a0 Mon Sep 17 00:00:00 2001 From: Sergey Nechaev Date: Thu, 9 Oct 2025 20:34:08 +0700 Subject: [PATCH] Update docs for v4 --- docs/web/docs/engines.md | 17 +++- docs/web/docs/features/ecmascript/array.md | 74 +++++++------- .../docs/features/ecmascript/collections.md | 10 +- docs/web/docs/features/ecmascript/date.md | 18 +--- docs/web/docs/features/ecmascript/error.md | 7 +- .../explicit-resource-management.md | 4 +- docs/web/docs/features/ecmascript/function.md | 8 +- .../docs/features/ecmascript/globalthis.md | 2 +- docs/web/docs/features/ecmascript/iterator.md | 3 +- docs/web/docs/features/ecmascript/json.md | 3 +- docs/web/docs/features/ecmascript/math.md | 2 +- docs/web/docs/features/ecmascript/number.md | 8 +- docs/web/docs/features/ecmascript/object.md | 6 +- docs/web/docs/features/ecmascript/promise.md | 2 +- docs/web/docs/features/ecmascript/reflect.md | 4 +- .../docs/features/ecmascript/string-regexp.md | 77 +++++++-------- docs/web/docs/features/ecmascript/symbol.md | 33 ++----- .../docs/features/ecmascript/typed-arrays.md | 7 +- docs/web/docs/features/iteration-helpers.md | 14 +-- .../features/proposals/array-deduplication.md | 6 +- .../features/proposals/array-filtering.md | 8 +- .../features/proposals/array-fromasync.md | 2 +- .../proposals/array-istemplateobject.md | 2 +- .../proposals/asynciterator-helpers.md | 2 +- .../proposals/change-array-by-copy.md | 10 +- .../proposals/compositekey-compositesymbol.md | 46 --------- .../dataview-get-set-uint8clamped.md | 2 +- .../function-is-callable-is-constructor.md | 36 ------- .../function-prototype-demethodize.md | 6 +- .../features/proposals/iterator-chunking.md | 2 +- .../features/proposals/iterator-helpers.md | 2 +- .../docs/features/proposals/iterator-range.md | 2 +- .../features/proposals/iterator-sequencing.md | 2 +- .../features/proposals/joint-iteration.md | 2 +- .../json-parse-source-text-access.md | 2 +- .../web/docs/features/proposals/map-upsert.md | 2 +- .../proposals/new-collections-methods.md | 78 --------------- .../features/proposals/number-from-string.md | 18 ---- .../proposals/number-prototype-clamp.md | 2 +- .../web/docs/features/proposals/observable.md | 41 -------- .../of-and-from-methods-on-collections.md | 6 +- .../features/proposals/reflect-metadata.md | 43 --------- .../docs/features/proposals/set-methods.md | 2 +- .../docs/features/proposals/string-cooked.md | 2 +- .../docs/features/proposals/string-dedent.md | 2 +- .../proposals/string-prototype-codepoints.md | 27 ------ .../features/proposals/string-replaceall.md | 2 +- .../symbol-custommatcher-for-extractors.md | 2 +- .../symbol-custommatcher-pattern-matching.md | 2 +- .../features/proposals/symbol-metadata.md | 5 +- .../features/proposals/symbol-predicates.md | 4 +- .../web-standards/base64-utility-methods.md | 2 +- .../features/web-standards/dom-exception.md | 3 +- .../web-standards/iterable-dom-collections.md | 7 +- .../features/web-standards/queuemicrotask.md | 2 +- docs/web/docs/features/web-standards/self.md | 2 +- .../features/web-standards/setimmediate.md | 2 +- .../web-standards/settimeout-setinterval.md | 24 ----- .../web-standards/structured-clone.md | 4 +- .../web-standards/url-and-urlsearchparams.md | 2 +- docs/web/docs/menu.json | 37 ------- docs/web/docs/usage.md | 96 ++++++------------- docs/web/index.md | 12 +-- 63 files changed, 217 insertions(+), 645 deletions(-) delete mode 100644 docs/web/docs/features/proposals/compositekey-compositesymbol.md delete mode 100644 docs/web/docs/features/proposals/function-is-callable-is-constructor.md delete mode 100644 docs/web/docs/features/proposals/new-collections-methods.md delete mode 100644 docs/web/docs/features/proposals/number-from-string.md delete mode 100644 docs/web/docs/features/proposals/observable.md delete mode 100644 docs/web/docs/features/proposals/reflect-metadata.md delete mode 100644 docs/web/docs/features/proposals/string-prototype-codepoints.md delete mode 100644 docs/web/docs/features/web-standards/settimeout-setinterval.md diff --git a/docs/web/docs/engines.md b/docs/web/docs/engines.md index 6bd406ecf0d2..e3b7a511b296 100644 --- a/docs/web/docs/engines.md +++ b/docs/web/docs/engines.md @@ -1,9 +1,20 @@ # Supported engines and compatibility data -`core-js` tries to support all possible JS engines and environments with ES3 support. Some features have a higher lower bar - for example, *some* accessors can properly work only from ES5, promises require a way to set a microtask or a task, etc. +Starting from version 4, `core-js` drops support for ancient engines and focuses on environments with at least IE11-level JavaScript features (approximately ES5 + some additions). Older platforms - such as IE10 and below, Android 4.4.3 and below, PhantomJS, Opera Presto, and similar legacy engines - are no longer supported. If you still need to support such legacy browsers, please continue using `core-js` version 3. -However, I have no possibility to test `core-js` absolutely everywhere - for example, testing in IE7- and some other ancient was stopped. The list of definitely supported engines you can see in the compatibility table by the link below. [Write](https://github.com/zloirock/core-js/issues) if you have issues or questions with the support of any engine. +The baseline is engines about IE11, ES5 with some additions: +- Basic `WeakMap` support (no matter bugs, for internal usage only, in polyfills could be fixed) +- Basic `Map` and `Set` support (no matter bugs, for internal usage only, in polyfills could be fixed or completely replaced) +- Basic `%TypedArray%`, `ArrayBuffer` and `DataView` constructors support (no matter bugs, in polyfills could be fixed) +- A way setting of a prototype - `Object.setPrototypeOf` or `__proto__` -`core-js` project provides (as [`core-js-compat`](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) package) all required data about the necessity of `core-js` modules, entry points, and tools for work with it - it's useful for integration with tools like `babel` or `swc`. If you wanna help, you could take a look at the related section of [`CONTRIBUTING`](contributing#h-how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](https://zloirock.github.io/core-js/master/compat/), the example: +Examples of supported engines: +- IE11 +- Chrome 38 +- Safari 7.1 +- FF15 +- Node 0.11 + +`core-js` provides (as [`@core-js/compat`](https://github.com/zloirock/core-js/tree/v4/packages/core-js-compat) package) all required data about the necessity of `core-js` modules, entry points, and tools for work with it - it's useful for integration with tools like `babel` or `swc`. If you wanna help, you could take a look at the related section of [`CONTRIBUTING`](contributing#h-how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](http://zloirock.github.io/core-js/v4/compat/), the example: ![compat-table](https://user-images.githubusercontent.com/2213682/217452234-ccdcfc5a-c7d3-40d1-ab3f-86902315b8c3.png) diff --git a/docs/web/docs/features/ecmascript/array.md b/docs/web/docs/features/ecmascript/array.md index 88a2f24605a4..4416a2c6d01c 100644 --- a/docs/web/docs/features/ecmascript/array.md +++ b/docs/web/docs/features/ecmascript/array.md @@ -1,7 +1,7 @@ # ECMAScript: Array ## Modules -[`es.array.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.from.js), [`es.array.from-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.from-async.js), [`es.array.is-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.is-array.js), [`es.array.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.of.js), [`es.array.copy-within`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.copy-within.js), [`es.array.fill`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.fill.js), [`es.array.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find.js), [`es.array.find-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-index.js), [`es.array.find-last`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-last.js), [`es.array.find-last-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.find-last-index.js), [`es.array.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.iterator.js), [`es.array.includes`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.includes.js), [`es.array.push`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.push.js), [`es.array.slice`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.slice.js), [`es.array.join`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.join.js), [`es.array.unshift`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unshift.js), [`es.array.index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.index-of.js), [`es.array.last-index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.last-index-of.js), [`es.array.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.every.js), [`es.array.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.some.js), [`es.array.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.for-each.js), [`es.array.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.map.js), [`es.array.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.filter.js), [`es.array.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reduce.js), [`es.array.reduce-right`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reduce-right.js), [`es.array.reverse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.reverse.js), [`es.array.sort`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.sort.js), [`es.array.flat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.flat.js), [`es.array.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.flat-map.js), [`es.array.unscopables.flat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unscopables.flat.js), [`es.array.unscopables.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.unscopables.flat-map.js), [`es.array.at`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.at.js), [`es.array.to-reversed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-reversed.js), [`es.array.to-sorted`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-sorted.js), [`es.array.to-spliced`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.to-spliced.js), [`es.array.with`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array.with.js). +[`es.array.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.from.js), [`es.array.from-async`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.from-async.js), [`es.array.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.of.js), [`es.array.copy-within`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.copy-within.js), [`es.array.fill`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.fill.js), [`es.array.find`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find.js), [`es.array.find-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-index.js), [`es.array.find-last`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-last.js), [`es.array.find-last-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.find-last-index.js), [`es.array.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.iterator.js), [`es.array.includes`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.includes.js), [`es.array.push`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.push.js), [`es.array.slice`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.slice.js), [`es.array.join`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.join.js), [`es.array.unshift`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unshift.js), [`es.array.index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.index-of.js), [`es.array.last-index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.last-index-of.js), [`es.array.map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.map.js), [`es.array.filter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.filter.js), [`es.array.reduce`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reduce.js), [`es.array.reduce-right`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reduce-right.js), [`es.array.reverse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.reverse.js), [`es.array.sort`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.sort.js), [`es.array.flat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.flat.js), [`es.array.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.flat-map.js), [`es.array.unscopables.flat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unscopables.flat.js), [`es.array.unscopables.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.unscopables.flat-map.js), [`es.array.at`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.at.js), [`es.array.to-reversed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-reversed.js), [`es.array.to-sorted`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-sorted.js), [`es.array.to-spliced`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.to-spliced.js), [`es.array.with`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array.with.js). ## Built-ins signatures ```ts @@ -10,7 +10,6 @@ class Array { concat(...args: Array): Array; // with adding support of @@isConcatSpreadable and @@species copyWithin(target: number, start: number, end?: number): this; entries(): Iterator<[index, value]>; - every(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): boolean; fill(value: any, start?: number, end?: number): this; filter(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): Array; // with adding support of @@species find(callbackfn: (value: any, index: number, target: any) => boolean), thisArg?: any): any; @@ -19,7 +18,6 @@ class Array { findLastIndex(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): uint; flat(depthArg?: number = 1): Array; flatMap(mapFn: (value: any, index: number, target: any) => any, thisArg: any): Array; - forEach(callbackfn: (value: any, index: number, target: any) => void, thisArg?: any): void; includes(searchElement: any, from?: number): boolean; indexOf(searchElement: any, from?: number): number; join(separator: string = ','): string; @@ -32,7 +30,6 @@ class Array { reverse(): this; // Safari 12.0 bug fix slice(start?: number, end?: number): Array; // with adding support of @@species splice(start?: number, deleteCount?: number, ...items: Array): Array; // with adding support of @@species - some(callbackfn: (value: any, index: number, target: any) => boolean, thisArg?: any): boolean; sort(comparefn?: (a: any, b: any) => number): this; // with modern behavior like stable sort toReversed(): Array; toSpliced(start?: number, deleteCount?: number, ...items: Array): Array; @@ -44,7 +41,6 @@ class Array { @@unscopables: { [newMethodNames: string]: true }; static from(items: Iterable | ArrayLike, mapFn?: (value: any, index: number) => any, thisArg?: any): Array; static fromAsync(asyncItems: AsyncIterable | Iterable | ArrayLike, mapfn?: (value: any, index: number) => any, thisArg?: any): Array; - static isArray(value: any): boolean; static of(...args: Array): Array; } @@ -59,42 +55,38 @@ core-js(-pure)/es|stable|actual|full/array core-js(-pure)/es|stable|actual|full/array/from core-js(-pure)/es|stable|actual|full/array/from-async core-js(-pure)/es|stable|actual|full/array/of -core-js(-pure)/es|stable|actual|full/array/is-array -core-js(-pure)/es|stable|actual|full/array(/virtual)/at -core-js(-pure)/es|stable|actual|full/array(/virtual)/concat -core-js(-pure)/es|stable|actual|full/array(/virtual)/copy-within -core-js(-pure)/es|stable|actual|full/array(/virtual)/entries -core-js(-pure)/es|stable|actual|full/array(/virtual)/every -core-js(-pure)/es|stable|actual|full/array(/virtual)/fill -core-js(-pure)/es|stable|actual|full/array(/virtual)/filter -core-js(-pure)/es|stable|actual|full/array(/virtual)/find -core-js(-pure)/es|stable|actual|full/array(/virtual)/find-index -core-js(-pure)/es|stable|actual|full/array(/virtual)/find-last -core-js(-pure)/es|stable|actual|full/array(/virtual)/find-last-index -core-js(-pure)/es|stable|actual|full/array(/virtual)/flat -core-js(-pure)/es|stable|actual|full/array(/virtual)/flat-map -core-js(-pure)/es|stable|actual|full/array(/virtual)/for-each -core-js(-pure)/es|stable|actual|full/array(/virtual)/includes -core-js(-pure)/es|stable|actual|full/array(/virtual)/index-of -core-js(-pure)/es|stable|actual|full/array(/virtual)/iterator -core-js(-pure)/es|stable|actual|full/array(/virtual)/join -core-js(-pure)/es|stable|actual|full/array(/virtual)/keys -core-js(-pure)/es|stable|actual|full/array(/virtual)/last-index-of -core-js(-pure)/es|stable|actual|full/array(/virtual)/map -core-js(-pure)/es|stable|actual|full/array(/virtual)/push -core-js(-pure)/es|stable|actual|full/array(/virtual)/reduce -core-js(-pure)/es|stable|actual|full/array(/virtual)/reduce-right -core-js(-pure)/es|stable|actual|full/array(/virtual)/reverse -core-js(-pure)/es|stable|actual|full/array(/virtual)/slice -core-js(-pure)/es|stable|actual|full/array(/virtual)/some -core-js(-pure)/es|stable|actual|full/array(/virtual)/sort -core-js(-pure)/es|stable|actual|full/array(/virtual)/splice -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-reversed -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-sorted -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-spliced -core-js(-pure)/es|stable|actual|full/array(/virtual)/unshift -core-js(-pure)/es|stable|actual|full/array(/virtual)/values -core-js(-pure)/es|stable|actual|full/array(/virtual)/with +core-js(-pure)/es|stable|actual|full/array(/prototype)/at +core-js(-pure)/es|stable|actual|full/array(/prototype)/concat +core-js(-pure)/es|stable|actual|full/array(/prototype)/copy-within +core-js(-pure)/es|stable|actual|full/array(/prototype)/entries +core-js(-pure)/es|stable|actual|full/array(/prototype)/fill +core-js(-pure)/es|stable|actual|full/array(/prototype)/filter +core-js(-pure)/es|stable|actual|full/array(/prototype)/find +core-js(-pure)/es|stable|actual|full/array(/prototype)/find-index +core-js(-pure)/es|stable|actual|full/array(/prototype)/find-last +core-js(-pure)/es|stable|actual|full/array(/prototype)/find-last-index +core-js(-pure)/es|stable|actual|full/array(/prototype)/flat +core-js(-pure)/es|stable|actual|full/array(/prototype)/flat-map +core-js(-pure)/es|stable|actual|full/array(/prototype)/includes +core-js(-pure)/es|stable|actual|full/array(/prototype)/index-of +core-js(-pure)/es|stable|actual|full/array(/prototype)/iterator +core-js(-pure)/es|stable|actual|full/array(/prototype)/join +core-js(-pure)/es|stable|actual|full/array(/prototype)/keys +core-js(-pure)/es|stable|actual|full/array(/prototype)/last-index-of +core-js(-pure)/es|stable|actual|full/array(/prototype)/map +core-js(-pure)/es|stable|actual|full/array(/prototype)/push +core-js(-pure)/es|stable|actual|full/array(/prototype)/reduce +core-js(-pure)/es|stable|actual|full/array(/prototype)/reduce-right +core-js(-pure)/es|stable|actual|full/array(/prototype)/reverse +core-js(-pure)/es|stable|actual|full/array(/prototype)/slice +core-js(-pure)/es|stable|actual|full/array(/prototype)/sort +core-js(-pure)/es|stable|actual|full/array(/prototype)/splice +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-reversed +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-sorted +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-spliced +core-js(-pure)/es|stable|actual|full/array(/prototype)/unshift +core-js(-pure)/es|stable|actual|full/array(/prototype)/values +core-js(-pure)/es|stable|actual|full/array(/prototype)/with ``` ## Examples diff --git a/docs/web/docs/features/ecmascript/collections.md b/docs/web/docs/features/ecmascript/collections.md index f37b5e99e4f4..eb8cfc082950 100644 --- a/docs/web/docs/features/ecmascript/collections.md +++ b/docs/web/docs/features/ecmascript/collections.md @@ -3,7 +3,7 @@ ## Map ### Modules -[`es.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.map.js), [`es.map.group-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.map.group-by.js). +[`es.map.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.map.constructor.js), [`es.map.species`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.map.species.js) and [`es.map.group-by`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.map.group-by.js). ### Built-ins signatures ```ts @@ -21,6 +21,7 @@ class Map { @@iterator(): Iterator<[key, value]>; readonly attribute size: number; static groupBy(items: Iterable, callbackfn: (value: any, index: number) => key): Map>; + static getter @@species: this; } ``` @@ -70,7 +71,7 @@ map.get(0); // => [2, 4] ## Set ### Modules -[`es.set`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.js), [`es.set.difference.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.difference.v2.js), [`es.set.intersection.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.intersection.v2.js), [`es.set.is-disjoint-from.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.is-disjoint-from.v2.js), [`es.set.is-subset-of.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.is-subset-of.v2.js), [`es.set.is-superset-of.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.is-superset-of.v2.js), [`es.set.symmetric-difference.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.symmetric-difference.v2.js), [`es.set.union.v2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.set.union.v2.js) +[`es.set.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.constructor.js), [`es.set.species`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.species.js), [`es.set.difference`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.difference.js), [`es.set.intersection`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.intersection.js), [`es.set.is-disjoint-from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.is-disjoint-from.js), [`es.set.is-subset-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.is-subset-of.js), [`es.set.is-superset-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.is-superset-of.js), [`es.set.symmetric-difference`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.symmetric-difference.js), [`es.set.union`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.set.union.js) ### Built-ins signatures ```ts @@ -93,6 +94,7 @@ class Set { union(other: SetLike): Set; @@iterator(): Iterator; readonly attribute size: number; + static getter @@species: this; } ``` @@ -144,7 +146,7 @@ new Set([5, 4, 3, 2, 1]).isSupersetOf(new Set([1, 2, 3])); // => true ## WeakMap ### Modules -[`es.weak-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.weak-map.js). +[`es.weak-map.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.weak-map.constructor.js). ### Built-ins signatures ```ts @@ -195,7 +197,7 @@ for (let key in person) console.log(key); // => only 'getName' ## WeakSet ### Modules -[`es.weak-set`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.weak-set.js). +[`es.weak-set.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.weak-set.constructor.js). ### Built-ins signatures ```ts diff --git a/docs/web/docs/features/ecmascript/date.md b/docs/web/docs/features/ecmascript/date.md index 358de0be428a..a83debe1cf34 100644 --- a/docs/web/docs/features/ecmascript/date.md +++ b/docs/web/docs/features/ecmascript/date.md @@ -1,34 +1,20 @@ # ECMAScript: Date -## Modules -[`es.date.to-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.to-string.js), ES5 features with fixes: [`es.date.now`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.now.js), [`es.date.to-iso-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.to-iso-string.js), [`es.date.to-json`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.to-json.js) and [`es.date.to-primitive`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.to-primitive.js). -Annex B methods. Modules [`es.date.get-year`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.get-year.js), [`es.date.set-year`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.set-year.js) and [`es.date.to-gmt-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.date.to-gmt-string.js). +## Modules +ES5 features with fixes: [`es.date.to-json`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.date.to-json.js) and [`es.date.to-primitive`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.date.to-primitive.js). ## Built-ins signatures ```ts class Date { - getYear(): int; - setYear(year: int): number; - toGMTString(): string; - toISOString(): string; toJSON(): string; - toString(): string; @@toPrimitive(hint: 'default' | 'number' | 'string'): string | number; - static now(): number; } ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) ``` core-js/es|stable|actual|full/date -core-js/es|stable|actual|full/date/to-string -core-js(-pure)/es|stable|actual|full/date/now -core-js(-pure)/es|stable|actual|full/date/get-year -core-js(-pure)/es|stable|actual|full/date/set-year -core-js(-pure)/es|stable|actual|full/date/to-gmt-string -core-js(-pure)/es|stable|actual|full/date/to-iso-string core-js(-pure)/es|stable|actual|full/date/to-json -core-js(-pure)/es|stable|actual|full/date/to-primitive ``` ## Examples diff --git a/docs/web/docs/features/ecmascript/error.md b/docs/web/docs/features/ecmascript/error.md index 1d0a7f9480b0..4ac3023667fd 100644 --- a/docs/web/docs/features/ecmascript/error.md +++ b/docs/web/docs/features/ecmascript/error.md @@ -1,13 +1,13 @@ # ECMAScript: Error + ## Modules -[`es.aggregate-error`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.aggregate-error.js), [`es.aggregate-error.cause`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.aggregate-error.cause.js), [`es.error.cause`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.error.cause.js), [`es.error.is-error`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.error.is-error.js), [`es.suppressed-error.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.suppressed-error.constructor.js), [`es.error.to-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.error.to-string.js). +[`es.aggregate-error.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.aggregate-error.constructor.js), [`es.aggregate-error.cause`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.aggregate-error.cause.js), [`es.error.cause`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.error.cause.js), [`es.error.is-error`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.error.is-error.js), [`es.suppressed-error.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.suppressed-error.constructor.js), [`es.error.to-string`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.error.to-string.js). ## Built-ins signatures ```ts class Error { static isError(value: any): boolean; constructor(message: string, { cause: any }): %Error%; - toString(): string; // different fixes } class [ @@ -44,7 +44,6 @@ class SuppressedError extends Error { core-js/es|stable|actual|full/error core-js/es|stable|actual|full/error/constructor core-js(-pure)/es|stable|actual|full/error/is-error -core-js/es|stable|actual|full/error/to-string core-js(-pure)/es|stable|actual|full/aggregate-error core-js(-pure)/es|stable|actual|full/suppressed-error ``` @@ -60,8 +59,6 @@ aggregate.errors[1] === error2; // => true const cause = new TypeError('Something wrong'); const error = new TypeError('Here explained what`s wrong', { cause }); error.cause === cause; // => true - -Error.prototype.toString.call({ message: 1, name: 2 }) === '2: 1'; // => true ``` ## `Error.isError` examples diff --git a/docs/web/docs/features/ecmascript/explicit-resource-management.md b/docs/web/docs/features/ecmascript/explicit-resource-management.md index 8f1d2939ad37..c7d2d4b6a3f2 100644 --- a/docs/web/docs/features/ecmascript/explicit-resource-management.md +++ b/docs/web/docs/features/ecmascript/explicit-resource-management.md @@ -3,7 +3,7 @@ > This is only built-ins for this Explicit Resource Management, `using` syntax support requires [transpiler support](https://babeljs.io/docs/babel-plugin-syntax-explicit-resource-management). ## Modules -[`es.disposable-stack.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.disposable-stack.constructor.js), [`es.iterator.dispose`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.dispose.js), [`es.async-disposable-stack.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.async-disposable-stack.constructor.js), [`es.async-iterator.async-dispose`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.async-dispose.js). +[`es.disposable-stack.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.disposable-stack.constructor.js), [`es.iterator.dispose`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.dispose.js), [`es.async-disposable-stack.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.async-disposable-stack.constructor.js), [`es.async-iterator.async-dispose`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.async-iterator.async-dispose.js). ## Built-ins signatures ```ts @@ -55,6 +55,4 @@ class AsyncIterator { ``` core-js(-pure)/es|stable|actual|full/disposable-stack core-js(-pure)/es|stable|actual|full/async-disposable-stack -core-js(-pure)/es|stable|actual|full/iterator/dispose -core-js(-pure)/es|stable|actual|full/async-iterator/async-dispose ``` diff --git a/docs/web/docs/features/ecmascript/function.md b/docs/web/docs/features/ecmascript/function.md index 7e04e704cfb2..655e703cd52c 100644 --- a/docs/web/docs/features/ecmascript/function.md +++ b/docs/web/docs/features/ecmascript/function.md @@ -1,13 +1,12 @@ # ECMAScript: Function ## Modules -[`es.function.name`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.function.name.js), [`es.function.has-instance`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.function.has-instance.js). Just ES5: [`es.function.bind`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.function.bind.js). +[`es.function.name`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.function.name.js), [`es.function.has-instance`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.function.has-instance.js). ## Built-ins signatures ```ts class Function { name: string; - bind(thisArg: any, ...args: Array): Function; @@hasInstance(value: any): boolean; } ``` @@ -16,14 +15,9 @@ class Function { ``` core-js/es|stable|actual|full/function core-js/es|stable|actual|full/function/name -core-js/es|stable|actual|full/function/has-instance -core-js(-pure)/es|stable|actual|full/function/bind -core-js(-pure)/es|stable|actual|full/function/virtual/bind ``` ## Examples ```js (function foo() { /* empty */ }).name; // => 'foo' - -console.log.bind(console, 42)(43); // -> 42 43 ``` diff --git a/docs/web/docs/features/ecmascript/globalthis.md b/docs/web/docs/features/ecmascript/globalthis.md index e9c029ec8412..e3229819399b 100644 --- a/docs/web/docs/features/ecmascript/globalthis.md +++ b/docs/web/docs/features/ecmascript/globalthis.md @@ -1,7 +1,7 @@ # ECMAScript: globalThis ## Modules -[`es.global-this`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.global-this.js). +[`es.global-this`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.global-this.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/ecmascript/iterator.md b/docs/web/docs/features/ecmascript/iterator.md index aba08872343c..7290f8f98223 100644 --- a/docs/web/docs/features/ecmascript/iterator.md +++ b/docs/web/docs/features/ecmascript/iterator.md @@ -1,6 +1,6 @@ # ECMAScript: Iterator ## Modules -[`es.iterator.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.constructor.js), [`es.iterator.dispose`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.dispose.js), [`es.iterator.drop`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.drop.js), [`es.iterator.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.every.js), [`es.iterator.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.filter.js), [`es.iterator.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.find.js), [`es.iterator.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.flat-map.js), [`es.iterator.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.for-each.js), [`es.iterator.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.from.js), [`es.iterator.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.map.js), [`es.iterator.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.reduce.js), [`es.iterator.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.some.js), [`es.iterator.take`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.take.js), [`es.iterator.to-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.iterator.to-array.js) +[`es.iterator.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.constructor.js), [`es.iterator.dispose`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.dispose.js), [`es.iterator.drop`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.drop.js), [`es.iterator.every`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.every.js), [`es.iterator.filter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.filter.js), [`es.iterator.find`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.find.js), [`es.iterator.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.flat-map.js), [`es.iterator.for-each`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.for-each.js), [`es.iterator.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.from.js), [`es.iterator.map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.map.js), [`es.iterator.reduce`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.reduce.js), [`es.iterator.some`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.some.js), [`es.iterator.take`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.take.js), [`es.iterator.to-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.iterator.to-array.js) ## Built-ins signatures ```ts @@ -25,7 +25,6 @@ class Iterator { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ``` core-js(-pure)/es|stable|actual|full/iterator -core-js(-pure)/es|stable|actual|full/iterator/dispose core-js(-pure)/es|stable|actual|full/iterator/drop core-js(-pure)/es|stable|actual|full/iterator/every core-js(-pure)/es|stable|actual|full/iterator/filter diff --git a/docs/web/docs/features/ecmascript/json.md b/docs/web/docs/features/ecmascript/json.md index 34d288135fb2..8eee34876082 100644 --- a/docs/web/docs/features/ecmascript/json.md +++ b/docs/web/docs/features/ecmascript/json.md @@ -2,7 +2,7 @@ Since `JSON` object is missed only in very old engines like IE7-, `core-js` does not provide a full `JSON` polyfill, however, fix already existing implementations by the current standard, for example, [well-formed `JSON.stringify`](https://github.com/tc39/proposal-well-formed-stringify). `JSON` is also fixed in other modules - for example, `Symbol` polyfill fixes `JSON.stringify` for correct work with symbols. ## Modules -[`es.json.to-string-tag`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.json.to-string-tag.js) and [`es.json.stringify`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.json.stringify.js). +[`es.json.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.json.to-string-tag.js) and [`es.json.stringify`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.json.stringify.js). ## Built-ins signatures ```ts @@ -15,7 +15,6 @@ namespace JSON { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ``` core-js(-pure)/es|stable|actual|full/json/stringify -core-js(-pure)/es|stable|actual|full/json/to-string-tag ``` ## Examples diff --git a/docs/web/docs/features/ecmascript/math.md b/docs/web/docs/features/ecmascript/math.md index 0bd8b2dd8aec..05eee90795f4 100644 --- a/docs/web/docs/features/ecmascript/math.md +++ b/docs/web/docs/features/ecmascript/math.md @@ -1,7 +1,7 @@ # ECMAScript: Math ## Modules -[`es.math.acosh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.acosh.js), [`es.math.asinh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.asinh.js), [`es.math.atanh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.atanh.js), [`es.math.cbrt`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.cbrt.js), [`es.math.clz32`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.clz32.js), [`es.math.cosh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.cosh.js), [`es.math.expm1`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.expm1.js), [`es.math.fround`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.fround.js), [`es.math.f16round`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.f16round.js), [`es.math.hypot`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.hypot.js), [`es.math.imul`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.imul.js), [`es.math.log10`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.log10.js), [`es.math.log1p`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.log1p.js), [`es.math.log2`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.log2.js), [`es.math.sign`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.sign.js), [`es.math.sinh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.sinh.js), [`esnext.math.sum-precise`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.sum-precise.js), [`es.math.tanh`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.tanh.js), [`es.math.trunc`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.trunc.js). +[`es.math.acosh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.acosh.js), [`es.math.asinh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.asinh.js), [`es.math.atanh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.atanh.js), [`es.math.cbrt`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.cbrt.js), [`es.math.clz32`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.clz32.js), [`es.math.cosh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.cosh.js), [`es.math.expm1`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.expm1.js), [`es.math.fround`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.fround.js), [`es.math.f16round`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.f16round.js), [`es.math.hypot`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.hypot.js), [`es.math.imul`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.imul.js), [`es.math.log10`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.log10.js), [`es.math.log1p`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.log1p.js), [`es.math.log2`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.log2.js), [`es.math.sign`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.sign.js), [`es.math.sinh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.sinh.js), [`esnext.math.sum-precise`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.math.sum-precise.js), [`es.math.tanh`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.tanh.js), [`es.math.trunc`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.trunc.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/ecmascript/number.md b/docs/web/docs/features/ecmascript/number.md index db9931ce7fbd..f1be0fd00f55 100644 --- a/docs/web/docs/features/ecmascript/number.md +++ b/docs/web/docs/features/ecmascript/number.md @@ -2,7 +2,7 @@ `Number` constructor support binary and octal literals ## Modules -[`es.number.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.constructor.js), [`es.number.epsilon`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.epsilon.js), [`es.number.is-finite`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.is-finite.js), [`es.number.is-integer`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.is-integer.js), [`es.number.is-nan`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.is-nan.js), [`es.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.is-safe-integer.js), [`es.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.max-safe-integer.js), [`es.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.min-safe-integer.js), [`es.number.parse-float`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.parse-float.js), [`es.number.parse-int`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.parse-int.js), [`es.number.to-exponential`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.to-exponential.js), [`es.number.to-fixed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.to-fixed.js), [`es.number.to-precision`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.number.to-precision.js), [`es.parse-int`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.parse-int.js), [`es.parse-float`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.parse-float.js). +[`es.number.epsilon`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.epsilon.js), [`es.number.is-finite`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.is-finite.js), [`es.number.is-integer`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.is-integer.js), [`es.number.is-nan`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.is-nan.js), [`es.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.is-safe-integer.js), [`es.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.max-safe-integer.js), [`es.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.min-safe-integer.js), [`es.number.parse-float`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.parse-float.js), [`es.number.parse-int`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.parse-int.js), [`es.number.to-exponential`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.to-exponential.js), [`es.number.to-fixed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.number.to-fixed.js), [`es.parse-int`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.parse-int.js), [`es.parse-float`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.parse-float.js). ## Built-ins signatures ```ts @@ -10,7 +10,6 @@ class Number { constructor(value: any): number; toExponential(digits: number): string; toFixed(digits: number): string; - toPrecision(precision: number): string; static isFinite(number: any): boolean; static isNaN(number: any): boolean; static isInteger(number: any): boolean; @@ -39,9 +38,8 @@ core-js(-pure)/es|stable|actual|full/number/parse-int core-js(-pure)/es|stable|actual|full/number/epsilon core-js(-pure)/es|stable|actual|full/number/max-safe-integer core-js(-pure)/es|stable|actual|full/number/min-safe-integer -core-js(-pure)/es|stable|actual|full/number(/virtual)/to-exponential -core-js(-pure)/es|stable|actual|full/number(/virtual)/to-fixed -core-js(-pure)/es|stable|actual|full/number(/virtual)/to-precision +core-js(-pure)/es|stable|actual|full/number(/prototype)/to-exponential +core-js(-pure)/es|stable|actual|full/number(/prototype)/to-fixed core-js(-pure)/es|stable|actual|full/parse-float core-js(-pure)/es|stable|actual|full/parse-int ``` diff --git a/docs/web/docs/features/ecmascript/object.md b/docs/web/docs/features/ecmascript/object.md index b1e648887568..aaec64927d89 100644 --- a/docs/web/docs/features/ecmascript/object.md +++ b/docs/web/docs/features/ecmascript/object.md @@ -1,7 +1,7 @@ # ECMAScript: Object ## Modules -[`es.object.assign`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.assign.js), [`es.object.create`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.create.js), [`es.object.define-getter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.define-getter.js), [`es.object.define-property`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.define-property.js), [`es.object.define-properties`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.define-properties.js), [`es.object.define-setter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.define-setter.js), [`es.object.entries`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.entries.js), [`es.object.freeze`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.freeze.js), [`es.object.from-entries`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.from-entries.js), [`es.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.get-own-property-descriptor.js), [`es.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.get-own-property-descriptors.js), [`es.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.get-own-property-names.js), [`es.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.get-prototype-of.js), [`es.object.group-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.group-by.js), [`es.object.has-own`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.has-own.js), [`es.object.is`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.is.js), [`es.object.is-extensible`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.is-extensible.js), [`es.object.is-frozen`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.is-frozen.js), [`es.object.is-sealed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.is-sealed.js), [`es.object.keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.keys.js), [`es.object.lookup-setter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.lookup-setter.js), [`es.object.lookup-getter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.lookup-getter.js), [`es.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.prevent-extensions.js), [`es.object.proto`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.proto.js), [`es.object.to-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.to-string.js), [`es.object.seal`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.seal.js), [`es.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.set-prototype-of.js), [`es.object.values`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.object.values.js). +[`es.object.assign`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.assign.js), [`es.object.define-getter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.define-getter.js), [`es.object.define-setter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.define-setter.js), [`es.object.entries`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.entries.js), [`es.object.freeze`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.freeze.js), [`es.object.from-entries`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.from-entries.js), [`es.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.get-own-property-descriptor.js), [`es.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.get-own-property-descriptors.js), [`es.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.get-own-property-names.js), [`es.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.get-prototype-of.js), [`es.object.group-by`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.group-by.js), [`es.object.has-own`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.has-own.js), [`es.object.is`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.is.js), [`es.object.is-extensible`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.is-extensible.js), [`es.object.is-frozen`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.is-frozen.js), [`es.object.is-sealed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.is-sealed.js), [`es.object.keys`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.keys.js), [`es.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.lookup-setter.js), [`es.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.lookup-getter.js), [`es.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.prevent-extensions.js), [`es.object.proto`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.proto.js), [`es.object.to-string`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.to-string.js), [`es.object.seal`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.seal.js), [`es.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.set-prototype-of.js), [`es.object.values`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.values.js). ## Built-ins signatures ```ts @@ -11,7 +11,7 @@ class Object { __defineSetter__(property: PropertyKey, setter: Function): void; __lookupGetter__(property: PropertyKey): Function | void; __lookupSetter__(property: PropertyKey): Function | void; - __proto__: Object | null; // required a way setting of prototype - will not in IE10-, it's for modern engines like Deno + __proto__: Object | null; static assign(target: Object, ...sources: Array): Object; static create(prototype: Object | null, properties?: { [property: PropertyKey]: PropertyDescriptor }): Object; static defineProperties(object: Object, properties: { [property: PropertyKey]: PropertyDescriptor })): Object; @@ -32,7 +32,7 @@ class Object { static keys(object: any): Array; static preventExtensions(object: any): any; static seal(object: any): any; - static setPrototypeOf(target: any, prototype: Object | null): any; // required __proto__ - IE11+ + static setPrototypeOf(target: any, prototype: Object | null): any; static values(object: any): Array; } ``` diff --git a/docs/web/docs/features/ecmascript/promise.md b/docs/web/docs/features/ecmascript/promise.md index 00aaf1a2ddaf..bb419376398d 100644 --- a/docs/web/docs/features/ecmascript/promise.md +++ b/docs/web/docs/features/ecmascript/promise.md @@ -1,7 +1,7 @@ # ECMAScript: Promise ## Modules -[`es.promise`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.js), [`es.promise.all-settled`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.all-settled.js), [`es.promise.any`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.any.js), [`es.promise.finally`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.finally.js), [`es.promise.try`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.try.js) and [`es.promise.with-resolvers`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.promise.with-resolvers.js). +[`es.promise`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.js), [`es.promise.catch`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.catch.js), [`es.promise.finally`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.finally.js), [`es.promise.resolve`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.resolve.js), [`es.promise.reject`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.reject.js), [`es.promise.all`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.all.js), [`es.promise.race`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.race.js), [`es.promise.all-settled`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.all-settled.js), [`es.promise.any`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.any.js), [`es.promise.try`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.try.js) and [`es.promise.with-resolvers`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.promise.with-resolvers.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/ecmascript/reflect.md b/docs/web/docs/features/ecmascript/reflect.md index e915b3f79e9c..cdbef3a2beb3 100644 --- a/docs/web/docs/features/ecmascript/reflect.md +++ b/docs/web/docs/features/ecmascript/reflect.md @@ -1,7 +1,7 @@ # ECMAScript: Reflect ## Modules -[`es.reflect.apply`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.apply.js), [`es.reflect.construct`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.construct.js), [`es.reflect.define-property`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.define-property.js), [`es.reflect.delete-property`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.delete-property.js), [`es.reflect.get`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.get.js), [`es.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.get-own-property-descriptor.js), [`es.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.get-prototype-of.js), [`es.reflect.has`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.has.js), [`es.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.is-extensible.js), [`es.reflect.own-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.own-keys.js), [`es.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.prevent-extensions.js), [`es.reflect.set`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.set.js), [`es.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.reflect.set-prototype-of.js). +[`es.reflect.apply`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.apply.js), [`es.reflect.construct`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.construct.js), [`es.reflect.define-property`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.define-property.js), [`es.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.delete-property.js), [`es.reflect.get`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.get.js), [`es.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.get-own-property-descriptor.js), [`es.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.get-prototype-of.js), [`es.reflect.has`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.has.js), [`es.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.is-extensible.js), [`es.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.own-keys.js), [`es.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.prevent-extensions.js), [`es.reflect.set`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.set.js), [`es.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.reflect.set-prototype-of.js). ## Built-ins signatures ```ts @@ -18,7 +18,7 @@ namespace Reflect { ownKeys(target: Object): Array; preventExtensions(target: Object): boolean; set(target: Object, propertyKey: PropertyKey, V: any, receiver?: any): boolean; - setPrototypeOf(target: Object, proto: Object | null): boolean; // required __proto__ - IE11+ + setPrototypeOf(target: Object, proto: Object | null): boolean; } ``` diff --git a/docs/web/docs/features/ecmascript/string-regexp.md b/docs/web/docs/features/ecmascript/string-regexp.md index 42c9cb737119..3da5bd486364 100644 --- a/docs/web/docs/features/ecmascript/string-regexp.md +++ b/docs/web/docs/features/ecmascript/string-regexp.md @@ -1,13 +1,13 @@ # ECMAScript: String and RegExp ## Modules -The main part of `String` features: modules [`es.string.from-code-point`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.from-code-point.js), [`es.string.raw`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.raw.js), [`es.string.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.iterator.js), [`es.string.split`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.split.js), [`es.string.code-point-at`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.code-point-at.js), [`es.string.ends-with`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.ends-with.js), [`es.string.includes`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.includes.js), [`es.string.repeat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.repeat.js), [`es.string.pad-start`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.pad-start.js), [`es.string.pad-end`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.pad-end.js), [`es.string.starts-with`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.starts-with.js), [`es.string.trim`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.trim.js), [`es.string.trim-start`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.trim-start.js), [`es.string.trim-end`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.trim-end.js), [`es.string.match-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.match-all.js), [`es.string.replace-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.replace-all.js), [`es.string.at-alternative`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.at-alternative.js), [`es.string.is-well-formed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.is-well-formed.js), [`es.string.to-well-formed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.to-well-formed.js). +The main part of `String` features: modules [`es.string.from-code-point`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.from-code-point.js), [`es.string.raw`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.raw.js), [`es.string.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.iterator.js), [`es.string.split`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.split.js), [`es.string.code-point-at`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.code-point-at.js), [`es.string.ends-with`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.ends-with.js), [`es.string.includes`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.includes.js), [`es.string.repeat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.repeat.js), [`es.string.pad-start`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.pad-start.js), [`es.string.pad-end`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.pad-end.js), [`es.string.starts-with`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.starts-with.js), [`es.string.trim`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.trim.js), [`es.string.trim-start`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.trim-start.js), [`es.string.trim-left`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.trim-left.js), [`es.string.trim-end`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.trim-end.js), [`es.string.trim-right`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.trim-right.js), [`es.string.match-all`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.match-all.js), [`es.string.replace-all`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.replace-all.js), [`es.string.at`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.at.js), [`es.string.is-well-formed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.is-well-formed.js), [`es.string.to-well-formed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.to-well-formed.js). -Adding support of well-known [symbols]({docs-version}/docs/features/ecmascript/symbol) `@@match`, `@@replace`, `@@search` and `@@split` and direct `.exec` calls to related `String` methods, modules [`es.string.match`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.match.js), [`es.string.replace`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.replace.js), [`es.string.search`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.search.js) and [`es.string.split`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.split.js). +Adding support of well-known [symbols](#ecmascript-symbol) `@@match`, `@@replace`, `@@search` and `@@split` and direct `.exec` calls to related `String` methods, modules [`es.string.match`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.match.js), [`es.string.replace`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.replace.js), [`es.string.search`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.search.js) and [`es.string.split`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.split.js). -Annex B methods. Modules [`es.string.anchor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.anchor.js), [`es.string.big`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.big.js), [`es.string.blink`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.blink.js), [`es.string.bold`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.bold.js), [`es.string.fixed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.fixed.js), [`es.string.fontcolor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.fontcolor.js), [`es.string.fontsize`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.fontsize.js), [`es.string.italics`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.italics.js), [`es.string.link`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.link.js), [`es.string.small`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.small.js), [`es.string.strike`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.strike.js), [`es.string.sub`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.sub.js), [`es.string.sup`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.sup.js), [`es.string.substr`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.string.substr.js), [`es.escape`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.escape.js) and [`es.unescape`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.unescape.js). +Annex B methods. Modules [`es.string.anchor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.anchor.js), [`es.string.big`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.big.js), [`es.string.blink`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.blink.js), [`es.string.bold`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.bold.js), [`es.string.fixed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.fixed.js), [`es.string.fontcolor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.fontcolor.js), [`es.string.fontsize`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.fontsize.js), [`es.string.italics`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.italics.js), [`es.string.link`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.link.js), [`es.string.small`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.small.js), [`es.string.strike`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.strike.js), [`es.string.sub`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.sub.js), [`es.string.sup`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.string.sup.js). -`RegExp` features: modules [`es.regexp.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.constructor.js), [`es.regexp.escape`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.escape.js), [`es.regexp.dot-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.dot-all.js), [`es.regexp.flags`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.flags.js), [`es.regexp.sticky`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.sticky.js) and [`es.regexp.test`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.regexp.test.js). +`RegExp` features: modules [`es.regexp.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.constructor.js), [`es.regexp.escape`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.escape.js), [`es.regexp.dot-all`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.dot-all.js), [`es.regexp.flags`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.flags.js), [`es.regexp.sticky`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.sticky.js) and [`es.regexp.test`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.regexp.test.js). ## Built-ins signatures ```ts @@ -47,7 +47,6 @@ class String { small(): string; strike(): string; sub(): string; - substr(start: int, length?: int): string; sup(): string; @@iterator(): Iterator; } @@ -68,9 +67,6 @@ class RegExp { readonly attribute flags: string; // IE9+ readonly attribute sticky: boolean; // IE9+ } - -function escape(string: string): string; -function unescape(string: string): string; ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) @@ -82,38 +78,37 @@ core-js/es|stable|actual|full/string/match core-js/es|stable|actual|full/string/replace core-js/es|stable|actual|full/string/search core-js/es|stable|actual|full/string/split -core-js(-pure)/es|stable|actual/string(/virtual)/at -core-js(-pure)/es|stable|actual|full/string(/virtual)/code-point-at -core-js(-pure)/es|stable|actual|full/string(/virtual)/ends-with -core-js(-pure)/es|stable|actual|full/string(/virtual)/includes -core-js(-pure)/es|stable|actual|full/string(/virtual)/starts-with -core-js(-pure)/es|stable|actual|full/string(/virtual)/match-all -core-js(-pure)/es|stable|actual|full/string(/virtual)/pad-start -core-js(-pure)/es|stable|actual|full/string(/virtual)/pad-end -core-js(-pure)/es|stable|actual|full/string(/virtual)/repeat -core-js(-pure)/es|stable|actual|full/string(/virtual)/replace-all -core-js(-pure)/es|stable|actual|full/string(/virtual)/trim -core-js(-pure)/es|stable|actual|full/string(/virtual)/trim-start -core-js(-pure)/es|stable|actual|full/string(/virtual)/trim-end -core-js(-pure)/es|stable|actual|full/string(/virtual)/trim-left -core-js(-pure)/es|stable|actual|full/string(/virtual)/trim-right -core-js(-pure)/es|stable|actual|full/string(/virtual)/is-well-formed -core-js(-pure)/es|stable|actual|full/string(/virtual)/to-well-formed -core-js(-pure)/es|stable|actual|full/string(/virtual)/anchor -core-js(-pure)/es|stable|actual|full/string(/virtual)/big -core-js(-pure)/es|stable|actual|full/string(/virtual)/blink -core-js(-pure)/es|stable|actual|full/string(/virtual)/bold -core-js(-pure)/es|stable|actual|full/string(/virtual)/fixed -core-js(-pure)/es|stable|actual|full/string(/virtual)/fontcolor -core-js(-pure)/es|stable|actual|full/string(/virtual)/fontsize -core-js(-pure)/es|stable|actual|full/string(/virtual)/italics -core-js(-pure)/es|stable|actual|full/string(/virtual)/link -core-js(-pure)/es|stable|actual|full/string(/virtual)/small -core-js(-pure)/es|stable|actual|full/string(/virtual)/strike -core-js(-pure)/es|stable|actual|full/string(/virtual)/sub -core-js(-pure)/es|stable|actual|full/string(/virtual)/substr -core-js(-pure)/es|stable|actual|full/string(/virtual)/sup -core-js(-pure)/es|stable|actual|full/string(/virtual)/iterator +core-js(-pure)/es|stable|actual/string(/prototype)/at +core-js(-pure)/es|stable|actual|full/string(/prototype)/code-point-at +core-js(-pure)/es|stable|actual|full/string(/prototype)/ends-with +core-js(-pure)/es|stable|actual|full/string(/prototype)/includes +core-js(-pure)/es|stable|actual|full/string(/prototype)/starts-with +core-js(-pure)/es|stable|actual|full/string(/prototype)/match-all +core-js(-pure)/es|stable|actual|full/string(/prototype)/pad-start +core-js(-pure)/es|stable|actual|full/string(/prototype)/pad-end +core-js(-pure)/es|stable|actual|full/string(/prototype)/repeat +core-js(-pure)/es|stable|actual|full/string(/prototype)/replace-all +core-js(-pure)/es|stable|actual|full/string(/prototype)/trim +core-js(-pure)/es|stable|actual|full/string(/prototype)/trim-start +core-js(-pure)/es|stable|actual|full/string(/prototype)/trim-end +core-js(-pure)/es|stable|actual|full/string(/prototype)/trim-left +core-js(-pure)/es|stable|actual|full/string(/prototype)/trim-right +core-js(-pure)/es|stable|actual|full/string(/prototype)/is-well-formed +core-js(-pure)/es|stable|actual|full/string(/prototype)/to-well-formed +core-js(-pure)/es|stable|actual|full/string(/prototype)/anchor +core-js(-pure)/es|stable|actual|full/string(/prototype)/big +core-js(-pure)/es|stable|actual|full/string(/prototype)/blink +core-js(-pure)/es|stable|actual|full/string(/prototype)/bold +core-js(-pure)/es|stable|actual|full/string(/prototype)/fixed +core-js(-pure)/es|stable|actual|full/string(/prototype)/fontcolor +core-js(-pure)/es|stable|actual|full/string(/prototype)/fontsize +core-js(-pure)/es|stable|actual|full/string(/prototype)/italics +core-js(-pure)/es|stable|actual|full/string(/prototype)/link +core-js(-pure)/es|stable|actual|full/string(/prototype)/small +core-js(-pure)/es|stable|actual|full/string(/prototype)/strike +core-js(-pure)/es|stable|actual|full/string(/prototype)/sub +core-js(-pure)/es|stable|actual|full/string(/prototype)/sup +core-js(-pure)/es|stable|actual|full/string(/prototype)/iterator core-js/es|stable|actual|full/regexp core-js/es|stable|actual|full/regexp/constructor core-js(-pure)/es|stable|actual|full/regexp/escape @@ -122,8 +117,6 @@ core-js(-pure)/es|stable|actual|full/regexp/flags core-js/es|stable|actual|full/regexp/sticky core-js/es|stable|actual|full/regexp/test core-js/es|stable|actual|full/regexp/to-string -core-js/es|stable|actual|full/escape -core-js/es|stable|actual|full/unescape ``` ## Examples diff --git a/docs/web/docs/features/ecmascript/symbol.md b/docs/web/docs/features/ecmascript/symbol.md index c73b0df959a1..e671dc2979b8 100644 --- a/docs/web/docs/features/ecmascript/symbol.md +++ b/docs/web/docs/features/ecmascript/symbol.md @@ -1,6 +1,6 @@ # ECMAScript: Symbol ## Modules -[`es.symbol`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.js), [`es.symbol.async-dispose`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.async-dispose.js), [`es.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.async-iterator.js), [`es.symbol.description`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.description.js), [`es.symbol.dispose`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.dispose.js), [`es.symbol.has-instance`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.has-instance.js), [`es.symbol.is-concat-spreadable`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.is-concat-spreadable.js), [`es.symbol.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.iterator.js), [`es.symbol.match`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.match.js), [`es.symbol.replace`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.replace.js), [`es.symbol.search`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.search.js), [`es.symbol.species`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.species.js), [`es.symbol.split`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.split.js), [`es.symbol.to-primitive`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.to-primitive.js), [`es.symbol.to-string-tag`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.to-string-tag.js), [`es.symbol.unscopables`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.unscopables.js), [`es.math.to-string-tag`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.math.to-string-tag.js). +[`es.symbol.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.constructor.js), [`es.symbol.for`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.for.js), [`es.symbol.key-for`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.key-for.js), [`es.symbol.async-dispose`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.async-dispose.js), [`es.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.async-iterator.js), [`es.symbol.description`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.description.js), [`es.symbol.dispose`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.dispose.js), [`es.symbol.has-instance`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.has-instance.js), [`es.symbol.is-concat-spreadable`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.is-concat-spreadable.js), [`es.symbol.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.iterator.js), [`es.symbol.match`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.match.js), [`es.symbol.replace`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.replace.js), [`es.symbol.search`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.search.js), [`es.symbol.species`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.species.js), [`es.symbol.split`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.split.js), [`es.symbol.to-primitive`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.to-primitive.js), [`es.symbol.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.to-string-tag.js), [`es.symbol.unscopables`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.symbol.unscopables.js), [`es.math.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.math.to-string-tag.js), [`es.object.get-own-property-symbols`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.object.get-own-property-symbols.js). ## Built-ins signatures ```ts @@ -23,8 +23,6 @@ class Symbol { static unscopables: @@unscopables; static for(key: string): symbol; static keyFor(sym: symbol): string; - static useSimple(): void; - static useSetter(): void; } class Object { @@ -64,7 +62,6 @@ core-js(-pure)/es|stable|actual|full/symbol/unscopables core-js(-pure)/es|stable|actual|full/symbol/for core-js(-pure)/es|stable|actual|full/symbol/key-for core-js(-pure)/es|stable|actual|full/object/get-own-property-symbols -core-js(-pure)/es|stable|actual|full/math/to-string-tag ``` ## Basic example @@ -112,25 +109,9 @@ Symbol('foo').description; // => 'foo' Symbol().description; // => undefined ``` -## Caveats when using `Symbol` polyfill - -- We can't add a new primitive type, `Symbol` returns an object. -- `Symbol.for` and `Symbol.keyFor` can't be polyfilled cross-realm. -- By default, to hide the keys, `Symbol` polyfill defines a setter in `Object.prototype`. For this reason, an uncontrolled creation of symbols can cause a memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`. - -You can disable defining setters in `Object.prototype`. *Example*: -```ts -Symbol.useSimple(); -let symbol1 = Symbol('symbol1'); -let object1 = {}; -object1[symbol1] = true; -for (let key in object1) console.log(key); // => 'Symbol(symbol1)_t.qamkg9f3q', w/o native Symbol - -Symbol.useSetter(); -let symbol2 = Symbol('symbol2'); -let object2 = {}; -object2[symbol2] = true; -for (let key in object2) console.log(key); // nothing -``` -- Currently, `core-js` does not add setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability. -- Some problems are possible with environment exotic objects (for example, IE `localStorage`). +> [!WARNING] +> - We can't add a new primitive type, `Symbol` returns an object. +> - `Symbol.for` and `Symbol.keyFor` can't be polyfilled cross-realm. +> - `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`. +> - `core-js` does not add setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability. +> - Some problems are possible with environment exotic objects (for example, IE `localStorage`). diff --git a/docs/web/docs/features/ecmascript/typed-arrays.md b/docs/web/docs/features/ecmascript/typed-arrays.md index 47a2150e2e40..8ceaea01dc97 100644 --- a/docs/web/docs/features/ecmascript/typed-arrays.md +++ b/docs/web/docs/features/ecmascript/typed-arrays.md @@ -2,7 +2,7 @@ Implementations and fixes for `ArrayBuffer`, `DataView`, Typed Arrays constructors, static and prototype methods. Typed arrays work only in environments with support descriptors (IE9+), `ArrayBuffer` and `DataView` should work anywhere. ## Modules -[`es.array-buffer.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array-buffer.constructor.js), [`es.array-buffer.is-view`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array-buffer.is-view.js), [`esnext.array-buffer.detached`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array-buffer.detached.js), [`es.array-buffer.slice`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.array-buffer.slice.js), [`esnext.array-buffer.transfer`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array-buffer.transfer.js), [`esnext.array-buffer.transfer-to-fixed-length`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js) [`es.data-view`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.data-view.js), [`es.data-view.get-float16`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.data-view.get-float16.js), [`es.data-view.set-float16`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.data-view.set-float16.js), [`es.typed-array.int8-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.int8-array.js), [`es.typed-array.uint8-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.uint8-array.js), [`es.typed-array.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.uint8-clamped-array.js), [`es.typed-array.int16-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.int16-array.js), [`es.typed-array.uint16-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.uint16-array.js), [`es.typed-array.int32-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.int32-array.js), [`es.typed-array.uint32-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.uint32-array.js), [`es.typed-array.float32-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.float32-array.js), [`es.typed-array.float64-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.float64-array.js), [`es.typed-array.copy-within`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.copy-within.js), [`es.typed-array.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.every.js), [`es.typed-array.fill`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.fill.js), [`es.typed-array.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.filter.js), [`es.typed-array.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.find.js), [`es.typed-array.find-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.find-index.js), [`es.typed-array.find-last`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.find-last.js), [`es.typed-array.find-last-index`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.find-last-index.js), [`es.typed-array.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.for-each.js), [`es.typed-array.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.from.js), [`es.typed-array.includes`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.includes.js), [`es.typed-array.index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.index-of.js), [`es.typed-array.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.iterator.js), [`es.typed-array.last-index-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.last-index-of.js), [`es.typed-array.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.map.js), [`es.typed-array.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.of.js), [`es.typed-array.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.reduce.js), [`es.typed-array.reduce-right`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.reduce-right.js), [`es.typed-array.reverse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.reverse.js), [`es.typed-array.set`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.set.js), [`es.typed-array.slice`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.slice.js), [`es.typed-array.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.some.js), [`es.typed-array.sort`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.sort.js), [`es.typed-array.subarray`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.subarray.js), [`es.typed-array.to-locale-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.to-locale-string.js), [`es.typed-array.to-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.to-string.js), [`es.typed-array.at`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.at.js), [`es.typed-array.to-reversed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.to-reversed.js), [`es.typed-array.to-sorted`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.to-sorted.js), [`es.typed-array.with`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.typed-array.with.js), [`es.uint8-array.from-base64`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.uint8-array.from-base64.js), [`es.uint8-array.from-hex`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.uint8-array.from-hex.js), [`es.uint8-array.set-from-hex`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.uint8-array.set-from-hex.js), [`es.uint8-array.to-base64`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.uint8-array.to-base64.js), [`es.uint8-array.to-hex`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.uint8-array.to-hex.js). +[`es.array-buffer.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array-buffer.constructor.js), [`es.array-buffer.is-view`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array-buffer.is-view.js), [`esnext.array-buffer.detached`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array-buffer.detached.js), [`es.array-buffer.slice`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array-buffer.slice.js), [`es.array-buffer.species`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array-buffer.species.js), [`es.array-buffer.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.array-buffer.to-string-tag.js), [`esnext.array-buffer.transfer`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array-buffer.transfer.js), [`esnext.array-buffer.transfer-to-fixed-length`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array-buffer.transfer-to-fixed-length.js), [`es.data-view.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.constructor.js), [`es.data-view.set-int8`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.set-int8.js), [`es.data-view.set-uint8`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.set-uint8.js), [`es.data-view.get-float16`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.get-float16.js), [`es.data-view.set-float16`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.set-float16.js), [`es.data-view.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.data-view.to-string-tag.js), [`es.typed-array.int8-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.int8-array.js), [`es.typed-array.uint8-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.uint8-array.js), [`es.typed-array.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.uint8-clamped-array.js), [`es.typed-array.int16-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.int16-array.js), [`es.typed-array.uint16-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.uint16-array.js), [`es.typed-array.int32-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.int32-array.js), [`es.typed-array.uint32-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.uint32-array.js), [`es.typed-array.float32-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.float32-array.js), [`es.typed-array.float64-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.float64-array.js), [`es.typed-array.copy-within`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.copy-within.js), [`es.typed-array.entries`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.entries.js), [`es.typed-array.every`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.every.js), [`es.typed-array.fill`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.fill.js), [`es.typed-array.filter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.filter.js), [`es.typed-array.find`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.find.js), [`es.typed-array.find-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.find-index.js), [`es.typed-array.find-last`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.find-last.js), [`es.typed-array.find-last-index`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.find-last-index.js), [`es.typed-array.for-each`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.for-each.js), [`es.typed-array.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.from.js), [`es.typed-array.includes`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.includes.js), [`es.typed-array.index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.index-of.js), [`es.typed-array.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.iterator.js), [`es.typed-array.keys`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.keys.js), [`es.typed-array.last-index-of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.last-index-of.js), [`es.typed-array.map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.map.js), [`es.typed-array.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.of.js), [`es.typed-array.reduce`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.reduce.js), [`es.typed-array.reduce-right`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.reduce-right.js), [`es.typed-array.reverse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.reverse.js), [`es.typed-array.set`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.set.js), [`es.typed-array.slice`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.slice.js), [`es.typed-array.some`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.some.js), [`es.typed-array.sort`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.sort.js), [`es.typed-array.subarray`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.subarray.js), [`es.typed-array.to-locale-string`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.to-locale-string.js), [`es.typed-array.to-string`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.to-string.js), [`es.typed-array.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.to-string-tag.js), [`es.typed-array.at`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.at.js), [`es.typed-array.to-reversed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.to-reversed.js), [`es.typed-array.to-sorted`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.to-sorted.js), [`es.typed-array.values`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.values.js), [`es.typed-array.with`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.typed-array.with.js), [`es.uint8-array.from-base64`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.uint8-array.from-base64.js), [`es.uint8-array.from-hex`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.uint8-array.from-hex.js), [`es.uint8-array.set-from-hex`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.uint8-array.set-from-hex.js), [`es.uint8-array.to-base64`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.uint8-array.to-base64.js), [`es.uint8-array.to-hex`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/es.uint8-array.to-hex.js). ## Built-ins signatures ```ts @@ -10,10 +10,12 @@ class ArrayBuffer { constructor(length: any): ArrayBuffer; readonly attribute byteLength: number; readonly attribute detached: boolean; + readonly attribute @@toStringTag: 'ArrayBuffer'; slice(start: any, end: any): ArrayBuffer; transfer(newLength?: number): ArrayBuffer; transferToFixedLength(newLength?: number): ArrayBuffer; static isView(arg: any): boolean; + static getter @@species: this; } class DataView { @@ -39,6 +41,7 @@ class DataView { readonly attribute buffer: ArrayBuffer; readonly attribute byteLength: number; readonly attribute byteOffset: number; + readonly attribute @@toStringTag: 'DataView'; } class [ @@ -94,10 +97,12 @@ class %TypedArray% { readonly attribute byteLength: number; readonly attribute byteOffset: number; readonly attribute length: number; + readonly attribute @@toStringTag: string; BYTES_PER_ELEMENT: number; static from(items: Iterable | ArrayLike, mapFn?: (value: any, index: number) => any, thisArg?: any): %TypedArray%; static of(...args: Array): %TypedArray%; static BYTES_PER_ELEMENT: number; + static getter @@species: this; } class Uint8Array { diff --git a/docs/web/docs/features/iteration-helpers.md b/docs/web/docs/features/iteration-helpers.md index 63121014e47c..835024c82e1a 100644 --- a/docs/web/docs/features/iteration-helpers.md +++ b/docs/web/docs/features/iteration-helpers.md @@ -9,17 +9,17 @@ function getIteratorMethod(value: any): Function | void; ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js-pure/es|stable|actual|full/is-iterable -core-js-pure/es|stable|actual|full/get-iterator -core-js-pure/es|stable|actual|full/get-iterator-method +``` +@core-js/pure/es|stable|actual|full/is-iterable +@core-js/pure/es|stable|actual|full/get-iterator +@core-js/pure/es|stable|actual|full/get-iterator-method ``` ## Examples ```ts -import isIterable from 'core-js-pure/actual/is-iterable'; -import getIterator from 'core-js-pure/actual/get-iterator'; -import getIteratorMethod from 'core-js-pure/actual/get-iterator-method'; +import isIterable from '@core-js/pure/actual/is-iterable'; +import getIterator from '@core-js/pure/actual/get-iterator'; +import getIteratorMethod from '@core-js/pure/actual/get-iterator-method'; let list = (function () { // eslint-disable-next-line prefer-rest-params -- example diff --git a/docs/web/docs/features/proposals/array-deduplication.md b/docs/web/docs/features/proposals/array-deduplication.md index 92211a156323..2dc96c43c7f2 100644 --- a/docs/web/docs/features/proposals/array-deduplication.md +++ b/docs/web/docs/features/proposals/array-deduplication.md @@ -2,7 +2,7 @@ [Proposal repo](https://github.com/tc39/proposal-array-unique) ## Modules -[`esnext.array.unique-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.unique-by.js), [`esnext.typed-array.unique-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.unique-by.js) +[`esnext.array.unique-by`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array.unique-by.js), [`esnext.typed-array.unique-by`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.typed-array.unique-by.js) ## Built-ins signatures ```ts @@ -16,9 +16,9 @@ class %TypedArray% { ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts +``` core-js/proposals/array-unique -core-js(-pure)/full/array(/virtual)/unique-by +core-js(-pure)/full/array(/prototype)/unique-by core-js/full/typed-array/unique-by ``` diff --git a/docs/web/docs/features/proposals/array-filtering.md b/docs/web/docs/features/proposals/array-filtering.md index 71981e68e336..6957b13bfc3e 100644 --- a/docs/web/docs/features/proposals/array-filtering.md +++ b/docs/web/docs/features/proposals/array-filtering.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-array-filtering) ## Modules -[`esnext.array.filter-reject`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.filter-reject.js), [`esnext.typed-array.filter-reject`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.filter-reject.js). +[`esnext.array.filter-reject`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array.filter-reject.js), [`esnext.typed-array.filter-reject`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.typed-array.filter-reject.js). ## Built-ins signatures ```ts @@ -17,9 +17,9 @@ class %TypedArray% { ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/array-filtering-stage-1 -core-js(-pure)/full/array(/virtual)/filter-reject +``` +core-js/proposals/array-filtering +core-js(-pure)/full/array(/prototype)/filter-reject core-js/full/typed-array/filter-reject ``` diff --git a/docs/web/docs/features/proposals/array-fromasync.md b/docs/web/docs/features/proposals/array-fromasync.md index fde8be3f2919..f0652802cdf5 100644 --- a/docs/web/docs/features/proposals/array-fromasync.md +++ b/docs/web/docs/features/proposals/array-fromasync.md @@ -11,5 +11,5 @@ class Array { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/array-from-async-stage-2 +core-js/proposals/array-from-async ``` diff --git a/docs/web/docs/features/proposals/array-istemplateobject.md b/docs/web/docs/features/proposals/array-istemplateobject.md index 740d968a997f..ad99aca63398 100644 --- a/docs/web/docs/features/proposals/array-istemplateobject.md +++ b/docs/web/docs/features/proposals/array-istemplateobject.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-array-is-template-object) ## Module -[`esnext.array.is-template-object`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.is-template-object.js) +[`esnext.array.is-template-object`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.array.is-template-object.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/asynciterator-helpers.md b/docs/web/docs/features/proposals/asynciterator-helpers.md index e5ce92b7d1b3..613506dfb338 100644 --- a/docs/web/docs/features/proposals/asynciterator-helpers.md +++ b/docs/web/docs/features/proposals/asynciterator-helpers.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-async-iterator-helpers) ## Modules -[`esnext.async-iterator.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.constructor.js), [`esnext.async-iterator.drop`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.drop.js), [`esnext.async-iterator.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.every.js), [`esnext.async-iterator.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.filter.js), [`esnext.async-iterator.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.find.js), [`esnext.async-iterator.flat-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.flat-map.js), [`esnext.async-iterator.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.for-each.js), [`esnext.async-iterator.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.from.js), [`esnext.async-iterator.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.map.js), [`esnext.async-iterator.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.reduce.js), [`esnext.async-iterator.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.some.js), [`esnext.async-iterator.take`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.take.js), [`esnext.async-iterator.to-array`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.async-iterator.to-array.js), , [`esnext.iterator.to-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.to-async.js) +[`esnext.async-iterator.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.constructor.js), [`esnext.async-iterator.drop`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.drop.js), [`esnext.async-iterator.every`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.every.js), [`esnext.async-iterator.filter`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.filter.js), [`esnext.async-iterator.find`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.find.js), [`esnext.async-iterator.flat-map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.flat-map.js), [`esnext.async-iterator.for-each`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.for-each.js), [`esnext.async-iterator.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.from.js), [`esnext.async-iterator.map`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.map.js), [`esnext.async-iterator.reduce`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.reduce.js), [`esnext.async-iterator.some`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.some.js), [`esnext.async-iterator.take`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.take.js), [`esnext.async-iterator.to-array`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.async-iterator.to-array.js), , [`esnext.iterator.to-async`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.to-async.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/change-array-by-copy.md b/docs/web/docs/features/proposals/change-array-by-copy.md index c23e1f4a7834..c3aab1f6b2d2 100644 --- a/docs/web/docs/features/proposals/change-array-by-copy.md +++ b/docs/web/docs/features/proposals/change-array-by-copy.md @@ -20,11 +20,11 @@ class %TypedArray% { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ``` -core-js/proposals/change-array-by-copy-stage-4 -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-reversed -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-sorted -core-js(-pure)/es|stable|actual|full/array(/virtual)/to-spliced -core-js(-pure)/es|stable|actual|full/array(/virtual)/with +core-js/proposals/change-array-by-copy +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-reversed +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-sorted +core-js(-pure)/es|stable|actual|full/array(/prototype)/to-spliced +core-js(-pure)/es|stable|actual|full/array(/prototype)/with core-js/es|stable|actual|full/typed-array/to-reversed core-js/es|stable|actual|full/typed-array/to-sorted core-js/es|stable|actual|full/typed-array/with diff --git a/docs/web/docs/features/proposals/compositekey-compositesymbol.md b/docs/web/docs/features/proposals/compositekey-compositesymbol.md deleted file mode 100644 index 482951295b6c..000000000000 --- a/docs/web/docs/features/proposals/compositekey-compositesymbol.md +++ /dev/null @@ -1,46 +0,0 @@ -# `compositeKey` and `compositeSymbol` -[Proposal repo](https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey) - -## Modules -[`esnext.composite-key`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.composite-key.js) and [`esnext.composite-symbol`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.composite-symbol.js) - -## Built-ins signatures -```ts -function compositeKey(...args: Array): object; -function compositeSymbol(...args: Array): symbol; -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/keys-composition -core-js(-pure)/full/composite-key -core-js(-pure)/full/composite-symbol -``` - -## Examples -```js -// returns a symbol -const symbol = compositeSymbol({}); -console.log(typeof symbol); // => 'symbol' - -// works the same, but returns a plain frozen object without a prototype -const key = compositeKey({}); -console.log(typeof key); // => 'object' -console.log({}.toString.call(key)); // => '[object Object]' -console.log(Object.getPrototypeOf(key)); // => null -console.log(Object.isFrozen(key)); // => true - -const a = ['a']; -const b = ['b']; -const c = ['c']; - -/* eslint-disable no-self-compare -- example */ -console.log(compositeSymbol(a) === compositeSymbol(a)); // => true -console.log(compositeSymbol(a) !== compositeSymbol(['a'])); // => true -console.log(compositeSymbol(a, 1) === compositeSymbol(a, 1)); // => true -console.log(compositeSymbol(a, b) !== compositeSymbol(b, a)); // => true -console.log(compositeSymbol(a, b, c) === compositeSymbol(a, b, c)); // => true -console.log(compositeSymbol(1, a) === compositeSymbol(1, a)); // => true -console.log(compositeSymbol(1, a, 2, b) === compositeSymbol(1, a, 2, b)); // => true -console.log(compositeSymbol(a, a) === compositeSymbol(a, a)); // => true -``` diff --git a/docs/web/docs/features/proposals/dataview-get-set-uint8clamped.md b/docs/web/docs/features/proposals/dataview-get-set-uint8clamped.md index 3c4d84bc0757..c5d662aa998a 100644 --- a/docs/web/docs/features/proposals/dataview-get-set-uint8clamped.md +++ b/docs/web/docs/features/proposals/dataview-get-set-uint8clamped.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-dataview-get-set-uint8clamped) ## Modules -[`esnext.data-view.get-uint8-clamped`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.data-view.get-uint8-clamped.js) and [`esnext.data-view.set-uint8-clamped`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.data-view.set-uint8-clamped.js) +[`esnext.data-view.get-uint8-clamped`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.data-view.get-uint8-clamped.js) and [`esnext.data-view.set-uint8-clamped`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.data-view.set-uint8-clamped.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/function-is-callable-is-constructor.md b/docs/web/docs/features/proposals/function-is-callable-is-constructor.md deleted file mode 100644 index c76a920b1772..000000000000 --- a/docs/web/docs/features/proposals/function-is-callable-is-constructor.md +++ /dev/null @@ -1,36 +0,0 @@ -# Function.{ isCallable, isConstructor } -[Proposal repo](https://github.com/caitp/TC39-Proposals/blob/trunk/tc39-reflect-isconstructor-iscallable.md) - -## Modules -[`esnext.function.is-callable`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.function.is-callable.js), [`esnext.function.is-constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.function.is-constructor.js) - -## Built-ins signatures -```ts -class Function { - static isCallable(value: any): boolean; - static isConstructor(value: any): boolean; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/function-is-callable-is-constructor -core-js(-pure)/full/function/is-callable -core-js(-pure)/full/function/is-constructor -``` - -## Examples -```js -/* eslint-disable prefer-arrow-callback -- example */ -Function.isCallable(null); // => false -Function.isCallable({}); // => false -Function.isCallable(function () { /* empty */ }); // => true -Function.isCallable(() => { /* empty */ }); // => true -Function.isCallable(class { /* empty */ }); // => false - -Function.isConstructor(null); // => false -Function.isConstructor({}); // => false -Function.isConstructor(function () { /* empty */ }); // => true -Function.isConstructor(() => { /* empty */ }); // => false -Function.isConstructor(class { /* empty */ }); // => true -``` diff --git a/docs/web/docs/features/proposals/function-prototype-demethodize.md b/docs/web/docs/features/proposals/function-prototype-demethodize.md index 815d6f32baa9..0f553a54bfb6 100644 --- a/docs/web/docs/features/proposals/function-prototype-demethodize.md +++ b/docs/web/docs/features/proposals/function-prototype-demethodize.md @@ -2,7 +2,7 @@ [Proposal repo](https://github.com/js-choi/proposal-function-demethodize) ## Module -[`esnext.function.demethodize`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.function.demethodize.js) +[`esnext.function.demethodize`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.function.demethodize.js) ## Built-ins signatures ```ts @@ -12,10 +12,10 @@ class Function { ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts +``` core-js/proposals/function-demethodize core-js(-pure)/full/function/demethodize -core-js(-pure)/full/function/virtual/demethodize +core-js(-pure)/full/function/prototype/demethodize ``` ## Examples diff --git a/docs/web/docs/features/proposals/iterator-chunking.md b/docs/web/docs/features/proposals/iterator-chunking.md index e191f0b4864f..320041d6c389 100644 --- a/docs/web/docs/features/proposals/iterator-chunking.md +++ b/docs/web/docs/features/proposals/iterator-chunking.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-iterator-chunking) ## Modules -[`esnext.iterator.chunks`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.chunks.js), [`esnext.iterator.windows`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.windows.js) +[`esnext.iterator.chunks`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.chunks.js), [`esnext.iterator.windows`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.windows.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/iterator-helpers.md b/docs/web/docs/features/proposals/iterator-helpers.md index b7afc9fe9519..692ec8b4e1bc 100644 --- a/docs/web/docs/features/proposals/iterator-helpers.md +++ b/docs/web/docs/features/proposals/iterator-helpers.md @@ -23,5 +23,5 @@ class Iterator { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/iterator-helpers-stage-3-2 +core-js/proposals/iterator-helpers ``` diff --git a/docs/web/docs/features/proposals/iterator-range.md b/docs/web/docs/features/proposals/iterator-range.md index b51fbbef4988..0eb2ead010aa 100644 --- a/docs/web/docs/features/proposals/iterator-range.md +++ b/docs/web/docs/features/proposals/iterator-range.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-Number.range) ## Module -[`esnext.iterator.range`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.range.js) +[`esnext.iterator.range`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.range.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/iterator-sequencing.md b/docs/web/docs/features/proposals/iterator-sequencing.md index 9a2ea23f6bf7..1f8ed435590b 100644 --- a/docs/web/docs/features/proposals/iterator-sequencing.md +++ b/docs/web/docs/features/proposals/iterator-sequencing.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-iterator-sequencing) ## Modules -[`esnext.iterator.concat`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.concat.js) +[`esnext.iterator.concat`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.concat.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/joint-iteration.md b/docs/web/docs/features/proposals/joint-iteration.md index d3e811fc25e3..baaa5b2c9d3b 100644 --- a/docs/web/docs/features/proposals/joint-iteration.md +++ b/docs/web/docs/features/proposals/joint-iteration.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-joint-iteration) ## Modules -[`esnext.iterator.zip`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip.js), [`esnext.iterator.zip-keyed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip-keyed.js) +[`esnext.iterator.zip`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.zip.js), [`esnext.iterator.zip-keyed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.iterator.zip-keyed.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/json-parse-source-text-access.md b/docs/web/docs/features/proposals/json-parse-source-text-access.md index 8d32510ece08..f59de8349c3f 100644 --- a/docs/web/docs/features/proposals/json-parse-source-text-access.md +++ b/docs/web/docs/features/proposals/json-parse-source-text-access.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-json-parse-with-source) ## Modules -[`esnext.json.is-raw-json`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.json.is-raw-json.js), [`esnext.json.parse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.json.parse.js), [`esnext.json.raw-json`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.json.raw-json.js). +[`esnext.json.is-raw-json`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.json.is-raw-json.js), [`esnext.json.parse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.json.parse.js), [`esnext.json.raw-json`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.json.raw-json.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/map-upsert.md b/docs/web/docs/features/proposals/map-upsert.md index fedacc261e64..8f91882ad990 100644 --- a/docs/web/docs/features/proposals/map-upsert.md +++ b/docs/web/docs/features/proposals/map-upsert.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/thumbsupep/proposal-upsert) ## Modules -[`esnext.map.get-or-insert`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.get-or-insert.js), [`esnext.map.get-or-insert-computed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.get-or-insert-computed.js), [`esnext.weak-map.get-or-insert`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.get-or-insert.js) and [`esnext.weak-map.get-or-insert-computed`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.get-or-insert-computed.js) +[`esnext.map.get-or-insert`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.map.get-or-insert.js), [`esnext.map.get-or-insert-computed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.map.get-or-insert-computed.js), [`esnext.weak-map.get-or-insert`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-map.get-or-insert.js) and [`esnext.weak-map.get-or-insert-computed`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-map.get-or-insert-computed.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/new-collections-methods.md b/docs/web/docs/features/proposals/new-collections-methods.md deleted file mode 100644 index 66f7e11d2419..000000000000 --- a/docs/web/docs/features/proposals/new-collections-methods.md +++ /dev/null @@ -1,78 +0,0 @@ -# New collections methods -[Specification](https://tc39.es/proposal-collection-methods/)\ -[Proposal repo](https://github.com/tc39/proposal-collection-methods) - -## Modules -[`esnext.set.add-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.add-all.js), [`esnext.set.delete-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.delete-all.js), [`esnext.set.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.every.js), [`esnext.set.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.filter.js), [`esnext.set.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.find.js), [`esnext.set.join`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.join.js), [`esnext.set.map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.map.js), [`esnext.set.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.reduce.js), [`esnext.set.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.some.js), [`esnext.map.delete-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.delete-all.js), [`esnext.map.every`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.every.js), [`esnext.map.filter`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.filter.js), [`esnext.map.find`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.find.js), [`esnext.map.find-key`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.find-key.js), [`esnext.map.includes`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.includes.js), [`esnext.map.key-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.key-by.js), [`esnext.map.key-of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.key-of.js), [`esnext.map.map-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.map-keys.js), [`esnext.map.map-values`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.map-values.js), [`esnext.map.merge`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.merge.js), [`esnext.map.reduce`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.reduce.js), [`esnext.map.some`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.some.js), [`esnext.map.update`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.update.js), [`esnext.weak-set.add-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-set.add-all.js), [`esnext.weak-set.delete-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-set.delete-all.js), [`esnext.weak-map.delete-all`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.delete-all.js) - -## Built-ins signatures -```ts -class Set { - addAll(...args: Array): this; - deleteAll(...args: Array): boolean; - every(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): boolean; - filter(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): Set; - find(callbackfn: (value: any, key: any, target: any) => boolean), thisArg?: any): any; - join(separator: string = ','): string; - map(callbackfn: (value: any, key: any, target: any) => any, thisArg?: any): Set; - reduce(callbackfn: (memo: any, value: any, key: any, target: any) => any, initialValue?: any): any; - some(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): boolean; -} - -class Map { - static keyBy(iterable: Iterable, callbackfn?: (value: any) => any): Map; - deleteAll(...args: Array): boolean; - every(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): boolean; - filter(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): Map; - find(callbackfn: (value: any, key: any, target: any) => boolean), thisArg?: any): any; - findKey(callbackfn: (value: any, key: any, target: any) => boolean), thisArg?: any): any; - includes(searchElement: any): boolean; - keyOf(searchElement: any): any; - mapKeys(mapFn: (value: any, index: number, target: any) => any, thisArg?: any): Map; - mapValues(mapFn: (value: any, index: number, target: any) => any, thisArg?: any): Map; - merge(...iterables: Array): this; - reduce(callbackfn: (memo: any, value: any, key: any, target: any) => any, initialValue?: any): any; - some(callbackfn: (value: any, key: any, target: any) => boolean, thisArg?: any): boolean; - update(key: any, callbackfn: (value: any, key: any, target: any) => any, thunk?: (key: any, target: any) => any): this; -} - -class WeakSet { - addAll(...args: Array): this; - deleteAll(...args: Array): boolean; -} - -class WeakMap { - deleteAll(...args: Array): boolean; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/collection-methods -core-js(-pure)/full/set/add-all -core-js(-pure)/full/set/delete-all -core-js(-pure)/full/set/every -core-js(-pure)/full/set/filter -core-js(-pure)/full/set/find -core-js(-pure)/full/set/join -core-js(-pure)/full/set/map -core-js(-pure)/full/set/reduce -core-js(-pure)/full/set/some -core-js(-pure)/full/map/delete-all -core-js(-pure)/full/map/every -core-js(-pure)/full/map/filter -core-js(-pure)/full/map/find -core-js(-pure)/full/map/find-key -core-js(-pure)/full/map/includes -core-js(-pure)/full/map/key-by -core-js(-pure)/full/map/key-of -core-js(-pure)/full/map/map-keys -core-js(-pure)/full/map/map-values -core-js(-pure)/full/map/merge -core-js(-pure)/full/map/reduce -core-js(-pure)/full/map/some -core-js(-pure)/full/map/update -core-js(-pure)/full/weak-set/add-all -core-js(-pure)/full/weak-set/delete-all -core-js(-pure)/full/weak-map/delete-all -``` diff --git a/docs/web/docs/features/proposals/number-from-string.md b/docs/web/docs/features/proposals/number-from-string.md deleted file mode 100644 index 86a760cfb62f..000000000000 --- a/docs/web/docs/features/proposals/number-from-string.md +++ /dev/null @@ -1,18 +0,0 @@ -# Number.fromString -[Proposal repo](https://github.com/tc39/proposal-number-fromstring) - -## Module -[`esnext.number.from-string`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.number.from-string.js) - -## Built-ins signatures -```ts -class Number { - fromString(string: string, radix: number): number; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/number-from-string -core-js(-pure)/full/number/from-string -``` diff --git a/docs/web/docs/features/proposals/number-prototype-clamp.md b/docs/web/docs/features/proposals/number-prototype-clamp.md index f196c9f13ddd..ee64fc8dd208 100644 --- a/docs/web/docs/features/proposals/number-prototype-clamp.md +++ b/docs/web/docs/features/proposals/number-prototype-clamp.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-math-clamp) ## Modules -[`esnext.number.clamp`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.number.clamp.js) +[`esnext.number.clamp`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.number.clamp.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/observable.md b/docs/web/docs/features/proposals/observable.md deleted file mode 100644 index 0d113d512c10..000000000000 --- a/docs/web/docs/features/proposals/observable.md +++ /dev/null @@ -1,41 +0,0 @@ -# Observable -[Specification](https://tc39.es/proposal-observable/)\ -[Proposal repo](https://github.com/zenparsing/es-observable) - -## Modules -[`esnext.observable`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.observable.js), [`esnext.symbol.observable`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.observable.js) - -## Built-ins signatures -```ts -class Observable { - constructor(subscriber: Function): Observable; - subscribe(observer: Function | { next?: Function, error?: Function, complete?: Function }): Subscription; - @@observable(): this; - static of(...items: Array): Observable; - static from(x: Observable | Iterable): Observable; - static readonly attribute @@species: this; -} - -class Symbol { - static observable: @@observable; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/observable -core-js(-pure)/full/observable -core-js(-pure)/full/symbol/observable -``` - -## Example -```js -new Observable(observer => { - observer.next('hello'); - observer.next('world'); - observer.complete(); -}).subscribe({ - next(it) { console.log(it); }, - complete() { console.log('!'); }, -}); -``` diff --git a/docs/web/docs/features/proposals/of-and-from-methods-on-collections.md b/docs/web/docs/features/proposals/of-and-from-methods-on-collections.md index 3027664ec2a2..d4451f55085a 100644 --- a/docs/web/docs/features/proposals/of-and-from-methods-on-collections.md +++ b/docs/web/docs/features/proposals/of-and-from-methods-on-collections.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-setmap-offrom) ## Modules -[`esnext.set.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.of.js), [`esnext.set.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.set.from.js), [`esnext.map.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.of.js), [`esnext.map.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.from.js), [`esnext.weak-set.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-set.of.js), [`esnext.weak-set.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-set.from.js), [`esnext.weak-map.of`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.of.js), [`esnext.weak-map.from`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.from.js) +[`esnext.set.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.set.of.js), [`esnext.set.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.set.from.js), [`esnext.map.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.map.of.js), [`esnext.map.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.map.from.js), [`esnext.weak-set.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-set.of.js), [`esnext.weak-set.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-set.from.js), [`esnext.weak-map.of`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-map.of.js), [`esnext.weak-map.from`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.weak-map.from.js) ## Built-ins signatures ```ts @@ -35,10 +35,10 @@ core-js(-pure)/full/set/from core-js(-pure)/full/set/of core-js(-pure)/full/map/from core-js(-pure)/full/map/of -core-js(-pure)/full/weak-set/of core-js(-pure)/full/weak-set/from -core-js(-pure)/full/weak-map/of +core-js(-pure)/full/weak-set/of core-js(-pure)/full/weak-map/from +core-js(-pure)/full/weak-map/of ``` ## Examples diff --git a/docs/web/docs/features/proposals/reflect-metadata.md b/docs/web/docs/features/proposals/reflect-metadata.md deleted file mode 100644 index 2e2df1420418..000000000000 --- a/docs/web/docs/features/proposals/reflect-metadata.md +++ /dev/null @@ -1,43 +0,0 @@ -# Reflect metadata -[Proposal repo](https://github.com/rbuckton/reflect-metadata) - -## Modules -[`esnext.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.define-metadata.js), [`esnext.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.delete-metadata.js), [`esnext.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-metadata.js), [`esnext.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-metadata-keys.js), [`esnext.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-own-metadata.js), [`esnext.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js), [`esnext.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.has-metadata.js), [`esnext.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.has-own-metadata.js) and [`esnext.reflect.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.metadata.js). - -## Built-ins signatures -```ts -namespace Reflect { - defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey?: PropertyKey): void; - getMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): any; - getOwnMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): any; - hasMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean; - hasOwnMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean; - deleteMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean; - getMetadataKeys(target: Object, propertyKey?: PropertyKey): Array; - getOwnMetadataKeys(target: Object, propertyKey?: PropertyKey): Array; - metadata(metadataKey: any, metadataValue: any): decorator(target: Object, targetKey?: PropertyKey) => void; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/reflect-metadata -core-js(-pure)/full/reflect/define-metadata -core-js(-pure)/full/reflect/delete-metadata -core-js(-pure)/full/reflect/get-metadata -core-js(-pure)/full/reflect/get-metadata-keys -core-js(-pure)/full/reflect/get-own-metadata -core-js(-pure)/full/reflect/get-own-metadata-keys -core-js(-pure)/full/reflect/has-metadata -core-js(-pure)/full/reflect/has-own-metadata -core-js(-pure)/full/reflect/metadata -``` - -## Examples -```js -let object = {}; -Reflect.defineMetadata('foo', 'bar', object); -Reflect.ownKeys(object); // => [] -Reflect.getOwnMetadataKeys(object); // => ['foo'] -Reflect.getOwnMetadata('foo', object); // => 'bar' -``` diff --git a/docs/web/docs/features/proposals/set-methods.md b/docs/web/docs/features/proposals/set-methods.md index 10aedfa3733c..7eecc39d7f4c 100644 --- a/docs/web/docs/features/proposals/set-methods.md +++ b/docs/web/docs/features/proposals/set-methods.md @@ -17,5 +17,5 @@ class Set { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/set-methods-v2 +core-js/proposals/set-methods ``` diff --git a/docs/web/docs/features/proposals/string-cooked.md b/docs/web/docs/features/proposals/string-cooked.md index 0986c89fc97d..05bb6a83872f 100644 --- a/docs/web/docs/features/proposals/string-cooked.md +++ b/docs/web/docs/features/proposals/string-cooked.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-string-cooked) ## Module -[`esnext.string.cooked`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.string.cooked.js) +[`esnext.string.cooked`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.string.cooked.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/string-dedent.md b/docs/web/docs/features/proposals/string-dedent.md index 8c85144444e0..b68335a1f7fd 100644 --- a/docs/web/docs/features/proposals/string-dedent.md +++ b/docs/web/docs/features/proposals/string-dedent.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-string-dedent) ## Modules -[`esnext.string.dedent`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.string.dedent.js) +[`esnext.string.dedent`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.string.dedent.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/string-prototype-codepoints.md b/docs/web/docs/features/proposals/string-prototype-codepoints.md deleted file mode 100644 index 9f9eba2918d1..000000000000 --- a/docs/web/docs/features/proposals/string-prototype-codepoints.md +++ /dev/null @@ -1,27 +0,0 @@ -# String.prototype.codePoints -[Specification](https://tc39.es/proposal-string-prototype-codepoints/)\ -[Proposal repo](https://github.com/tc39/proposal-string-prototype-codepoints) - -## Module -[`esnext.string.code-points`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.string.code-points.js) - -## Built-ins signatures -```ts -class String { - codePoints(): Iterator<{ codePoint, position }>; -} -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js/proposals/string-code-points -core-js(-pure)/full/string/code-points -``` - -## Example -```js -for (let { codePoint, position } of 'qwe'.codePoints()) { - console.log(codePoint); // => 113, 119, 101 - console.log(position); // => 0, 1, 2 -} -``` diff --git a/docs/web/docs/features/proposals/string-replaceall.md b/docs/web/docs/features/proposals/string-replaceall.md index 45552eb9999f..ee52c399687a 100644 --- a/docs/web/docs/features/proposals/string-replaceall.md +++ b/docs/web/docs/features/proposals/string-replaceall.md @@ -11,5 +11,5 @@ class String { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/string-replace-all-stage-4 +core-js/proposals/string-replace-all ``` diff --git a/docs/web/docs/features/proposals/symbol-custommatcher-for-extractors.md b/docs/web/docs/features/proposals/symbol-custommatcher-for-extractors.md index 034b7b5645e9..a6ef2a82b228 100644 --- a/docs/web/docs/features/proposals/symbol-custommatcher-for-extractors.md +++ b/docs/web/docs/features/proposals/symbol-custommatcher-for-extractors.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-extractors) ## Module -[`esnext.symbol.custom-matcher`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.custom-matcher.js). +[`esnext.symbol.custom-matcher`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.symbol.custom-matcher.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/symbol-custommatcher-pattern-matching.md b/docs/web/docs/features/proposals/symbol-custommatcher-pattern-matching.md index 3f11ff424646..08d61b2976ae 100644 --- a/docs/web/docs/features/proposals/symbol-custommatcher-pattern-matching.md +++ b/docs/web/docs/features/proposals/symbol-custommatcher-pattern-matching.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-pattern-matching) ## Module -[`esnext.symbol.custom-matcher`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.custom-matcher.js). +[`esnext.symbol.custom-matcher`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.symbol.custom-matcher.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/proposals/symbol-metadata.md b/docs/web/docs/features/proposals/symbol-metadata.md index db698be01b1f..8c92eafd57c9 100644 --- a/docs/web/docs/features/proposals/symbol-metadata.md +++ b/docs/web/docs/features/proposals/symbol-metadata.md @@ -2,7 +2,7 @@ [Proposal repo](https://github.com/tc39/proposal-decorator-metadata) ## Modules -[`esnext.symbol.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.metadata.js) and [`esnext.function.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.function.metadata.js). +[`esnext.symbol.metadata`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.symbol.metadata.js) and [`esnext.function.metadata`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.function.metadata.js). ## Built-ins signatures ```ts @@ -17,7 +17,6 @@ class Function { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/decorator-metadata-v2 +core-js/proposals/decorator-metadata core-js(-pure)/actual|full/symbol/metadata -core-js(-pure)/actual|full/function/metadata ``` diff --git a/docs/web/docs/features/proposals/symbol-predicates.md b/docs/web/docs/features/proposals/symbol-predicates.md index dd0ee886c53e..bf7efafa7d55 100644 --- a/docs/web/docs/features/proposals/symbol-predicates.md +++ b/docs/web/docs/features/proposals/symbol-predicates.md @@ -3,7 +3,7 @@ [Proposal repo](https://github.com/tc39/proposal-symbol-predicates) ## Modules -[`esnext.symbol.is-registered-symbol`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.is-registered-symbol.js), [`esnext.symbol.is-well-known-symbol`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.is-well-known-symbol.js). +[`esnext.symbol.is-registered-symbol`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.symbol.is-registered-symbol.js), [`esnext.symbol.is-well-known-symbol`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.symbol.is-well-known-symbol.js). ## Built-ins signatures ```ts @@ -15,7 +15,7 @@ class Symbol { ## [Entry points]({docs-version}/docs/usage#h-entry-points) ```ts -core-js/proposals/symbol-predicates-v2 +core-js/proposals/symbol-predicates core-js(-pure)/full/symbol/is-registered-symbol core-js(-pure)/full/symbol/is-well-known-symbol ``` diff --git a/docs/web/docs/features/web-standards/base64-utility-methods.md b/docs/web/docs/features/web-standards/base64-utility-methods.md index c8ee7a4a1092..434baaeeeae0 100644 --- a/docs/web/docs/features/web-standards/base64-utility-methods.md +++ b/docs/web/docs/features/web-standards/base64-utility-methods.md @@ -3,7 +3,7 @@ [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Base64) ## Modules -[`web.atob`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.atob.js), [`web.btoa`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.btoa.js). +[`web.atob`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.atob.js), [`web.btoa`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.btoa.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/web-standards/dom-exception.md b/docs/web/docs/features/web-standards/dom-exception.md index e74f17a1e80a..210026ab13c3 100644 --- a/docs/web/docs/features/web-standards/dom-exception.md +++ b/docs/web/docs/features/web-standards/dom-exception.md @@ -2,7 +2,7 @@ [Specification](https://webidl.spec.whatwg.org/#idl-DOMException) ## Modules -[`web.dom-exception.constructor`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.dom-exception.constructor.js), [`web.dom-exception.stack`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.dom-exception.stack.js), [`web.dom-exception.to-string-tag`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.dom-exception.to-string-tag.js). +[`web.dom-exception.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-exception.constructor.js), [`web.dom-exception.stack`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-exception.stack.js), [`web.dom-exception.to-string-tag`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-exception.to-string-tag.js). ## Built-ins signatures ```ts @@ -20,7 +20,6 @@ class DOMException { ```ts core-js(-pure)/stable|actual|full/dom-exception core-js(-pure)/stable|actual|full/dom-exception/constructor -core-js/stable|actual|full/dom-exception/to-string-tag ``` ## Examples diff --git a/docs/web/docs/features/web-standards/iterable-dom-collections.md b/docs/web/docs/features/web-standards/iterable-dom-collections.md index ced788374be9..9a004e66bd97 100644 --- a/docs/web/docs/features/web-standards/iterable-dom-collections.md +++ b/docs/web/docs/features/web-standards/iterable-dom-collections.md @@ -2,7 +2,7 @@ Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That means they should have `forEach`, `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. ## Modules -[`web.dom-collections.iterator`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.dom-collections.iterator.js), [`web.dom-collections.for-each`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.dom-collections.for-each.js). +[`web.dom-collections.iterator`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-collections.iterator.js), [`web.dom-collections.entries`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-collections.entries.js), [`web.dom-collections.keys`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-collections.keys.js), [`web.dom-collections.values`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-collections.values.js) and [`web.dom-collections.for-each`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.dom-collections.for-each.js). ## Built-ins signatures ```ts @@ -50,8 +50,11 @@ class [DOMTokenList, NodeList] { ``` ## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts +``` core-js(-pure)/stable|actual|full/dom-collections/iterator +core-js/stable|actual|full/dom-collections/entries +core-js/stable|actual|full/dom-collections/keys +core-js/stable|actual|full/dom-collections/values core-js/stable|actual|full/dom-collections/for-each ``` diff --git a/docs/web/docs/features/web-standards/queuemicrotask.md b/docs/web/docs/features/web-standards/queuemicrotask.md index fda5fc1a0ee7..b8717f637de7 100644 --- a/docs/web/docs/features/web-standards/queuemicrotask.md +++ b/docs/web/docs/features/web-standards/queuemicrotask.md @@ -2,7 +2,7 @@ [Specification](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask) ## Module -[`web.queue-microtask`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.queue-microtask.js) +[`web.queue-microtask`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.queue-microtask.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/web-standards/self.md b/docs/web/docs/features/web-standards/self.md index 06467d99d80c..3ee8dfe157bf 100644 --- a/docs/web/docs/features/web-standards/self.md +++ b/docs/web/docs/features/web-standards/self.md @@ -2,7 +2,7 @@ [Specification](https://html.spec.whatwg.org/multipage/window-object.html#dom-self) ## Module -[`web.self`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.self.js) +[`web.self`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.self.js) ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/web-standards/setimmediate.md b/docs/web/docs/features/web-standards/setimmediate.md index 7fbcc47a1cbe..79ecdfbe57fa 100644 --- a/docs/web/docs/features/web-standards/setimmediate.md +++ b/docs/web/docs/features/web-standards/setimmediate.md @@ -1,7 +1,7 @@ # setImmediate ## Module -[`web.immediate`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.immediate.js). [`setImmediate`](https://w3c.github.io/setImmediate/) polyfill. +[`web.set-immediate`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.set-immediate.js) and [`web.clear-immediate`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.clear-immediate.js). [`setImmediate`](https://w3c.github.io/setImmediate/) polyfill. ## Built-ins signatures ```ts diff --git a/docs/web/docs/features/web-standards/settimeout-setinterval.md b/docs/web/docs/features/web-standards/settimeout-setinterval.md deleted file mode 100644 index 397dd472c215..000000000000 --- a/docs/web/docs/features/web-standards/settimeout-setinterval.md +++ /dev/null @@ -1,24 +0,0 @@ -# `setTimeout` and `setInterval` - -## Module -[`web.timers`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.timers.js). Additional arguments fix for IE9-. - -## Built-ins signatures -```ts -function setTimeout(callback: any, time: any, ...args: Array): number; -function setInterval(callback: any, time: any, ...args: Array): number; -``` - -## [Entry points]({docs-version}/docs/usage#h-entry-points) -```ts -core-js(-pure)/stable|actual|full/set-timeout -core-js(-pure)/stable|actual|full/set-interval -``` - -## Examples -```js -// Before: -setTimeout(console.log.bind(null, 41), 1000); -// After: -setTimeout(console.log, 1000, 42); -``` diff --git a/docs/web/docs/features/web-standards/structured-clone.md b/docs/web/docs/features/web-standards/structured-clone.md index 69ae0af23899..45bc1bfd36cd 100644 --- a/docs/web/docs/features/web-standards/structured-clone.md +++ b/docs/web/docs/features/web-standards/structured-clone.md @@ -2,7 +2,7 @@ [Specification](https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone) ## Module -[`web.structured-clone`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.structured-clone.js) +[`web.structured-clone`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.structured-clone.js) ## Built-ins signatures ```ts @@ -46,4 +46,4 @@ structuredClone(new WeakMap()); // => DataCloneError on non-serializable types ``` > [!WARNING] > - Many platform types cannot be transferred in most engines since we have no way to polyfill this behavior, however `.transfer` option works for some platform types. I recommend avoiding this option. -> - Some specific platform types can't be cloned in old engines. Mainly it's very specific types or very old engines, but here are some exceptions. For example, we have no sync way to clone `ImageBitmap` in Safari 14.0- or Firefox 83-, so it's recommended to look to the [polyfill source](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.structured-clone.js) if you wanna clone something specific. +> - Some specific platform types can't be cloned in old engines. Mainly it's very specific types or very old engines, but here are some exceptions. For example, we have no sync way to clone `ImageBitmap` in Safari 14.0- or Firefox 83-, so it's recommended to look to the [polyfill source](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.structured-clone.js) if you wanna clone something specific. diff --git a/docs/web/docs/features/web-standards/url-and-urlsearchparams.md b/docs/web/docs/features/web-standards/url-and-urlsearchparams.md index 29aeefb76adb..5fbfe0b881bc 100644 --- a/docs/web/docs/features/web-standards/url-and-urlsearchparams.md +++ b/docs/web/docs/features/web-standards/url-and-urlsearchparams.md @@ -2,7 +2,7 @@ [`URL` standard](https://url.spec.whatwg.org/) implementation. ## Modules -[`web.url`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url.js), [`web.url.can-parse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url.can-parse.js), [`web.url.parse`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url.parse.js), [`web.url.to-json`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url.to-json.js), [`web.url-search-params`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url-search-params.js), [`web.url-search-params.delete`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url-search-params.delete.js), [`web.url-search-params.has`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url-search-params.has.js), [`web.url-search-params.size`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.url-search-params.size.js). +[`web.url.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url.constructor.js), [`web.url.can-parse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url.can-parse.js), [`web.url.parse`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url.parse.js), [`web.url.to-json`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url.to-json.js), [`web.url-search-params.constructor`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url-search-params.constructor.js), [`web.url-search-params.delete`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url-search-params.delete.js), [`web.url-search-params.has`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url-search-params.has.js), [`web.url-search-params.size`](https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/web.url-search-params.size.js). ## Built-ins signatures ```ts diff --git a/docs/web/docs/menu.json b/docs/web/docs/menu.json index c9e586293189..cfd5a25b3709 100644 --- a/docs/web/docs/menu.json +++ b/docs/web/docs/menu.json @@ -305,22 +305,10 @@ { "title": "Stage 1 proposals", "children": [ - { - "title": "Observable", - "url": "{docs-version}/docs/features/proposals/observable" - }, - { - "title": "New collections methods", - "url": "{docs-version}/docs/features/proposals/new-collections-methods" - }, { "title": ".of and .from methods on collection constructors", "url": "{docs-version}/docs/features/proposals/of-and-from-methods-on-collections" }, - { - "title": "compositeKey and compositeSymbol", - "url": "{docs-version}/docs/features/proposals/compositekey-compositesymbol" - }, { "title": "Array filtering", "url": "{docs-version}/docs/features/proposals/array-filtering" @@ -333,18 +321,10 @@ "title": "DataView get / set Uint8Clamped methods", "url": "{docs-version}/docs/features/proposals/dataview-get-set-uint8clamped" }, - { - "title": "Number.fromString", - "url": "{docs-version}/docs/features/proposals/number-from-string" - }, { "title": "String.cooked", "url": "{docs-version}/docs/features/proposals/string-cooked" }, - { - "title": "String.prototype.codePoints", - "url": "{docs-version}/docs/features/proposals/string-prototype-codepoints" - }, { "title": "Symbol.customMatcher for pattern matching", "url": "{docs-version}/docs/features/proposals/symbol-custommatcher-pattern-matching" @@ -357,19 +337,6 @@ { "title": "Function.prototype.demethodize", "url": "{docs-version}/docs/features/proposals/function-prototype-demethodize" - }, - { - "title": "Function.{ isCallable, isConstructor }", - "url": "{docs-version}/docs/features/proposals/function-is-callable-is-constructor" - } - ] - }, - { - "title": "Pre-stage 0 proposals", - "children": [ - { - "title": "Reflect metadata", - "url": "{docs-version}/docs/features/proposals/reflect-metadata" } ] } @@ -390,10 +357,6 @@ "title": "Base64 utility methods", "url": "{docs-version}/docs/features/web-standards/base64-utility-methods" }, - { - "title": "setTimeout and setInterval", - "url": "{docs-version}/docs/features/web-standards/settimeout-setinterval" - }, { "title": "setImmediate", "url": "{docs-version}/docs/features/web-standards/setimmediate" diff --git a/docs/web/docs/usage.md b/docs/web/docs/usage.md index cce8229a599f..5ceb9546b673 100644 --- a/docs/web/docs/usage.md +++ b/docs/web/docs/usage.md @@ -2,14 +2,14 @@ ## Installation ```sh // global version -npm install --save core-js@3.45.0 +npm install --save core-js@4.0.0-alpha.0 // version without global namespace pollution -npm install --save core-js-pure@3.45.0 +npm install --save @core-js/pure@4.0.0-alpha.0 // bundled global version -npm install --save core-js-bundle@3.45.0 +npm install --save @core-js/bundle@4.0.0-alpha.0 ``` -Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/core-js-bundle). +Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/@core-js/bundle). ## Entry points You can import only-required-for-you polyfills, like in the examples at the top of `README.md`. Available CommonJS entry points for all polyfilled methods / constructors and namespaces. Just some examples: @@ -37,10 +37,10 @@ import "core-js/stable/set"; // only stable ES features required for `Set`: import "core-js/es/set"; // the same without global namespace pollution: -import Set from "core-js-pure/full/set"; -import Set from "core-js-pure/actual/set"; -import Set from "core-js-pure/stable/set"; -import Set from "core-js-pure/es/set"; +import Set from "@core-js/pure/full/set"; +import Set from "@core-js/pure/actual/set"; +import Set from "@core-js/pure/stable/set"; +import Set from "@core-js/pure/es/set"; // if you want to polyfill just the required methods: import "core-js/full/set/intersection"; @@ -60,15 +60,15 @@ import "core-js/stage/2"; > [!WARNING] > - The `modules` path is an internal API, does not inject all required dependencies and can be changed in minor or patch releases. Use it only for a custom build and/or if you know what are you doing. > - If you use `core-js` with the extension of native objects, recommended to load all `core-js` modules at the top of the entry point of your application, otherwise, you can have conflicts. - > - For example, Google Maps use their own `Symbol.iterator`, conflicting with `Array.from`, `URLSearchParams` and / or something else from `core-js`, see [related issues](https://github.com/zloirock/core-js/search?q=Google+Maps&type=Issues). +> - For example, Google Maps use their own `Symbol.iterator`, conflicting with `Array.from`, `URLSearchParams` and / or something else from `core-js`, see [related issues](https://github.com/zloirock/core-js/search?q=Google+Maps&type=Issues). > - Such conflicts are also resolvable by discovering and manually adding each conflicting entry from `core-js`. > - `core-js` is extremely modular and uses a lot of very tiny modules, because of that for usage in browsers bundle up `core-js` instead of a usage loader for each file, otherwise, you will have hundreds of requests. ## CommonJS and prototype methods without global namespace pollution -In the `pure` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed into static methods like in examples above. But with transpilers, we can use one more trick - [bind operator and virtual methods](https://github.com/tc39/proposal-bind-operator). Special for that, available `/virtual/` entry points. Example: +In the `pure` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed into static methods like in examples above. But with transpilers, we can use one more trick - [bind operator and prototype methods](https://github.com/tc39/proposal-bind-operator). Special for that, available `/prototype/` entry points. Example: ```ts -import fill from 'core-js-pure/actual/array/virtual/fill'; -import findIndex from 'core-js-pure/actual/array/virtual/find-index'; +import fill from '@core-js/pure/actual/array/prototype/fill'; +import findIndex from '@core-js/pure/actual/array/prototype/find-index'; Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4 ``` @@ -94,10 +94,10 @@ import 'regenerator-runtime/runtime'; ## `@babel/preset-env` -[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '3.45'`. +[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes the use of the global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to the used version of `core-js`, like `corejs: '4.1'`. > [!IMPORTANT] -> It is recommended to specify the used minor `core-js` version, like `corejs: '3.45'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases. +> It is recommended to specify the used minor `core-js` version, like `corejs: '4.1'`, instead of `corejs: 4`, since with `corejs: 4` will not be injected modules which were added in minor `core-js` releases. --- @@ -123,14 +123,14 @@ with `chrome 71` target you will have as the result: import 'core-js/modules/es.array.unscopables.flat'; import 'core-js/modules/es.array.unscopables.flat-map'; import 'core-js/modules/es.object.from-entries'; -import 'core-js/modules/esnext.set.difference'; -import 'core-js/modules/esnext.set.intersection'; -import 'core-js/modules/esnext.set.is-disjoint-from'; -import 'core-js/modules/esnext.set.is-subset-of'; -import 'core-js/modules/esnext.set.is-superset-of'; +import 'core-js/modules/es.set.difference'; +import 'core-js/modules/es.set.intersection'; +import 'core-js/modules/es.set.is-disjoint-from'; +import 'core-js/modules/es.set.is-subset-of'; +import 'core-js/modules/es.set.is-superset-of'; +import 'core-js/modules/es.set.symmetric-difference'; +import 'core-js/modules/es.set.union'; import 'core-js/modules/esnext.set.map'; -import 'core-js/modules/esnext.set.symmetric-difference'; -import 'core-js/modules/esnext.set.union'; ``` - `useBuiltIns: 'usage'` adds to the top of each file import of polyfills for features used in this file and not supported by target environments, so for: @@ -147,7 +147,7 @@ if the target contains an old environment like `IE 11` we will have something li // first file: import 'core-js/modules/es.array.iterator'; import 'core-js/modules/es.object.to-string'; -import 'core-js/modules/es.set'; +import 'core-js/modules/es.set.constructor'; var set = new Set([1, 2, 3]); ``` @@ -158,19 +158,19 @@ import 'core-js/modules/es.array.of'; var array = Array.of(1, 2, 3); ``` -By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '3.45', proposals: true }`. +By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by the `proposals` option, as `corejs: { version: '4.0', proposals: true }`. > [!IMPORTANT] > In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically. ## `@babel/runtime` -[`@babel/runtime`](https://babeljs.io/docs/plugins/transform-runtime/) with `corejs: 3` option simplifies work with the `core-js-pure`. It automatically replaces the usage of modern features from the JS standard library to imports from the version of `core-js` without global namespace pollution, so instead of: +[`@babel/runtime`](https://babeljs.io/docs/plugins/transform-runtime/) with `corejs: 4` option simplifies work with the `@core-js/pure`. It automatically replaces the usage of modern features from the JS standard library to imports from the version of `core-js` without global namespace pollution, so instead of: ```ts -import from from 'core-js-pure/stable/array/from'; -import flat from 'core-js-pure/stable/array/flat'; -import Set from 'core-js-pure/stable/set'; -import Promise from 'core-js-pure/stable/promise'; +import from from '@core-js/pure/stable/array/from'; +import flat from '@core-js/pure/stable/array/flat'; +import Set from '@core-js/pure/stable/set'; +import Promise from '@core-js/pure/stable/promise'; from(new Set([1, 2, 3, 2, 1])); flat([1, [2, 3], [4, [5]]], 2); @@ -183,7 +183,7 @@ Array.from(new Set([1, 2, 3, 2, 1])); Promise.resolve(32).then(x => console.log(x)); ``` -By default, `@babel/runtime` only polyfills stable features, but like in `@babel/preset-env`, you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: 3, proposals: true }`. +By default, `@babel/runtime` only polyfills stable features, but like in `@babel/preset-env`, you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: 4, proposals: true }`. > [!WARNING] > If you use `@babel/preset-env` and `@babel/runtime` together, use `corejs` option only in one place since it's duplicate functionality and will cause conflicts. @@ -196,45 +196,11 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s "env": { "targets": "> 0.25%, not dead", "mode": "entry", - "coreJs": "3.45" + "coreJs": "4.0" } } ``` -## Configurable level of aggressiveness - -By default, `core-js` sets polyfills only when they are required. That means that `core-js` checks if a feature is available and works correctly or not and if it has no problems, `core-js` uses native implementation. - -But sometimes `core-js` feature detection could be too strict for your case. For example, `Promise` constructor requires the support of unhandled rejection tracking and `@@species`. - -Sometimes we could have an inverse problem - a knowingly broken environment with problems not covered by `core-js` feature detection. - -For those cases, we could redefine this behavior for certain polyfills: - -```ts -const configurator = require('core-js/configurator'); - -configurator({ - useNative: ['Promise'], // polyfills will be used only if natives are completely unavailable - usePolyfill: ['Array.from', 'String.prototype.padEnd'], // polyfills will be used anyway - useFeatureDetection: ['Map', 'Set'], // default behavior -}); - -require('core-js/actual'); -``` - -It does not work with some features. Also, if you change the default behavior, even `core-js` internals may not work correctly. - ## Custom build -For some cases could be useful to exclude some `core-js` features or generate a polyfill for target engines. You could use [`core-js-builder`](https://github.com/zloirock/core-js/tree/master/packages/core-js-builder) package for that. - -## `postinstall` message -The `core-js` project needs your help, so the package shows a message about it after installation. If it causes problems for you, you can disable it: -```sh -ADBLOCK=true npm install -// or -DISABLE_OPENCOLLECTIVE=true npm install -// or -npm install --loglevel silent -``` +For some cases could be useful to exclude some `core-js` features or generate a polyfill for target engines. You could use [`@core-js/builder`](https://github.com/zloirock/core-js/tree/v4/packages/core-js-builder) package for that. diff --git a/docs/web/index.md b/docs/web/index.md index 88e596759d12..dc60a02d1b5a 100644 --- a/docs/web/index.md +++ b/docs/web/index.md @@ -114,12 +114,12 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) or use it without global namespace pollution: ```ts -import Promise from 'core-js-pure/actual/promise'; -import Set from 'core-js-pure/actual/set'; -import Iterator from 'core-js-pure/actual/iterator'; -import from from 'core-js-pure/actual/array/from'; -import flatMap from 'core-js-pure/actual/array/flat-map'; -import structuredClone from 'core-js-pure/actual/structured-clone'; +import Promise from '@core-js/pure/actual/promise'; +import Set from '@core-js/pure/actual/set'; +import Iterator from '@core-js/pure/actual/iterator'; +import from from '@core-js/pure/actual/array/from'; +import flatMap from '@core-js/pure/actual/array/flat-map'; +import structuredClone from '@core-js/pure/actual/structured-clone'; await Promise.try(() => 42); // => 42