core-js 2.6.8 → 2.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +1 -1
- package/README.md +62 -62
- package/bower.json +1 -1
- package/client/core.js +81 -76
- package/client/core.min.js +5 -5
- package/client/core.min.js.map +1 -1
- package/client/library.js +10 -5
- package/client/library.min.js +5 -5
- package/client/library.min.js.map +1 -1
- package/client/shim.js +2 -2
- package/client/shim.min.js +2 -2
- package/client/shim.min.js.map +1 -1
- package/library/modules/_core.js +1 -1
- package/library/modules/_shared.js +1 -1
- package/library/modules/es7.string.at.js +6 -1
- package/modules/_core.js +1 -1
- package/modules/_shared.js +1 -1
- package/modules/es7.string.at.js +6 -1
- package/package.json +2 -2
- package/postinstall.js +58 -0
- package/scripts/postinstall.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
## Changelog
|
|
2
|
+
##### 2.6.12 [LEGACY] - 2020.11.26
|
|
3
|
+
- Added code points / code units explicit feature detection in `String#at` for preventing breakage code which use obsolete `String#at` proposal polyfill
|
|
4
|
+
- Added `OPEN_SOURCE_CONTRIBUTOR` detection in `postinstall`
|
|
5
|
+
- Added Drone CI detection in `postinstall`
|
|
6
|
+
|
|
7
|
+
##### 2.6.11 [LEGACY] - 2019.12.09
|
|
8
|
+
- Returned usage of `node -e` in `postinstall` scripts for better cross-platform compatibility, [#582](https://github.com/zloirock/core-js/issues/582)
|
|
9
|
+
- Improved CI detection in the `postinstall` script, [#707](https://github.com/zloirock/core-js/issues/707)
|
|
10
|
+
|
|
11
|
+
##### 2.6.10 [LEGACY] - 2019.10.13
|
|
12
|
+
- Show similar `postinstall` messages only once per `npm i`, [#597](https://github.com/zloirock/core-js/issues/597)
|
|
13
|
+
|
|
14
|
+
##### 2.6.9 [LEGACY] - 2019.05.27
|
|
15
|
+
- Some fixes and improvements of the `postinstall` script like support `npm` color config ([#556](https://github.com/zloirock/core-js/issues/556)) or adding support of `ADBLOCK` env variable
|
|
16
|
+
|
|
2
17
|
##### 2.6.8 [LEGACY] - 2019.05.22
|
|
3
18
|
- Added a workaround of a strange `npx` bug on `postinstall`, [#551](https://github.com/zloirock/core-js/issues/551)
|
|
4
19
|
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -101,9 +101,9 @@ require('core-js/shim');
|
|
|
101
101
|
```
|
|
102
102
|
If you need complete build for browser, use builds from `core-js/client` path:
|
|
103
103
|
|
|
104
|
-
* [default](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
105
|
-
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
106
|
-
* [shim only](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
104
|
+
* [default](https://raw.githack.com/zloirock/core-js/v2.6.12/client/core.min.js): Includes all features, standard and non-standard.
|
|
105
|
+
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.12/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)).
|
|
106
|
+
* [shim only](https://raw.githack.com/zloirock/core-js/v2.6.12/client/shim.min.js): Only includes the standard methods.
|
|
107
107
|
|
|
108
108
|
Warning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur.
|
|
109
109
|
|
|
@@ -253,11 +253,11 @@ core-js(/library)/es5
|
|
|
253
253
|
core-js(/library)/es6
|
|
254
254
|
```
|
|
255
255
|
#### ECMAScript 6: Object
|
|
256
|
-
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
256
|
+
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.to-string.js).
|
|
257
257
|
|
|
258
|
-
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
258
|
+
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.get-own-property-names.js).
|
|
259
259
|
|
|
260
|
-
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
260
|
+
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.object.es6.object.define-properties.js).
|
|
261
261
|
```js
|
|
262
262
|
Object
|
|
263
263
|
.assign(target, ...src) -> target
|
|
@@ -325,7 +325,7 @@ Object.keys('qwe'); // => ['0', '1', '2']
|
|
|
325
325
|
Object.getPrototypeOf('qwe') === String.prototype; // => true
|
|
326
326
|
```
|
|
327
327
|
#### ECMAScript 6: Function
|
|
328
|
-
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
328
|
+
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.function.bind.js).
|
|
329
329
|
```js
|
|
330
330
|
Function
|
|
331
331
|
#bind(object, ...args) -> boundFn(...args)
|
|
@@ -347,7 +347,7 @@ core-js/fn/function/virtual/bind
|
|
|
347
347
|
console.log.bind(console, 42)(43); // => 42 43
|
|
348
348
|
```
|
|
349
349
|
#### ECMAScript 6: Array
|
|
350
|
-
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
350
|
+
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.array.sort.js).
|
|
351
351
|
```js
|
|
352
352
|
Array
|
|
353
353
|
.from(iterable | array-like, mapFn(val, index)?, that) -> array
|
|
@@ -459,9 +459,9 @@ Array(5).fill(42); // => [42, 42, 42, 42, 42]
|
|
|
459
459
|
[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]
|
|
460
460
|
```
|
|
461
461
|
#### ECMAScript 6: String
|
|
462
|
-
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
462
|
+
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.trim.js).
|
|
463
463
|
|
|
464
|
-
Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
464
|
+
Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.string.sup.js).
|
|
465
465
|
```js
|
|
466
466
|
String
|
|
467
467
|
.fromCodePoint(...codePoints) -> str
|
|
@@ -560,9 +560,9 @@ String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'
|
|
|
560
560
|
'baz'.link('http://example.com'); // => '<a href="http://example.com">baz</a>'
|
|
561
561
|
```
|
|
562
562
|
#### ECMAScript 6: RegExp
|
|
563
|
-
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
563
|
+
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.flags.js).
|
|
564
564
|
|
|
565
|
-
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
565
|
+
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.regexp.split.js).
|
|
566
566
|
```
|
|
567
567
|
[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)
|
|
568
568
|
#flags -> str (IE9+)
|
|
@@ -603,12 +603,12 @@ RegExp(/./g, 'm'); // => /./m
|
|
|
603
603
|
RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar'
|
|
604
604
|
```
|
|
605
605
|
#### ECMAScript 6: Number
|
|
606
|
-
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
606
|
+
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):
|
|
607
607
|
```js
|
|
608
608
|
Number('0b1010101'); // => 85
|
|
609
609
|
Number('0o7654321'); // => 2054353
|
|
610
610
|
```
|
|
611
|
-
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
611
|
+
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.parse-float.js).
|
|
612
612
|
```js
|
|
613
613
|
[new] Number(var) -> number | number object
|
|
614
614
|
.isFinite(num) -> bool
|
|
@@ -644,7 +644,7 @@ core-js(/library)/fn/parse-float
|
|
|
644
644
|
core-js(/library)/fn/parse-int
|
|
645
645
|
```
|
|
646
646
|
#### ECMAScript 6: Math
|
|
647
|
-
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
647
|
+
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.math.trunc.js).
|
|
648
648
|
```js
|
|
649
649
|
Math
|
|
650
650
|
.acosh(num) -> num
|
|
@@ -687,7 +687,7 @@ core-js(/library)/fn/math/tanh
|
|
|
687
687
|
core-js(/library)/fn/math/trunc
|
|
688
688
|
```
|
|
689
689
|
#### ECMAScript 6: Date
|
|
690
|
-
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
690
|
+
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.date.to-primitive.js).
|
|
691
691
|
```js
|
|
692
692
|
Date
|
|
693
693
|
.now() -> int
|
|
@@ -711,7 +711,7 @@ new Date(NaN).toString(); // => 'Invalid Date'
|
|
|
711
711
|
```
|
|
712
712
|
|
|
713
713
|
#### ECMAScript 6: Promise
|
|
714
|
-
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
714
|
+
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.promise.js).
|
|
715
715
|
```js
|
|
716
716
|
new Promise(executor(resolve(var), reject(var))) -> promise
|
|
717
717
|
#then(resolved(var), rejected(var)) -> promise
|
|
@@ -831,7 +831,7 @@ setTimeout(() => p.catch(_ => _), 1e3);
|
|
|
831
831
|
```
|
|
832
832
|
|
|
833
833
|
#### ECMAScript 6: Symbol
|
|
834
|
-
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
834
|
+
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.symbol.js).
|
|
835
835
|
```js
|
|
836
836
|
Symbol(description?) -> symbol
|
|
837
837
|
.hasInstance -> @@hasInstance
|
|
@@ -943,7 +943,7 @@ for(var key in o2)console.log(key); // nothing
|
|
|
943
943
|
#### ECMAScript 6: Collections
|
|
944
944
|
`core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup).
|
|
945
945
|
#### Map
|
|
946
|
-
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
946
|
+
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.map.js).
|
|
947
947
|
```js
|
|
948
948
|
new Map(iterable (entries) ?) -> map
|
|
949
949
|
#clear() -> void
|
|
@@ -997,7 +997,7 @@ for(var [key, val] of map.entries()){
|
|
|
997
997
|
}
|
|
998
998
|
```
|
|
999
999
|
#### Set
|
|
1000
|
-
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1000
|
+
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.set.js).
|
|
1001
1001
|
```js
|
|
1002
1002
|
new Set(iterable?) -> set
|
|
1003
1003
|
#add(key) -> @
|
|
@@ -1041,7 +1041,7 @@ for(var [key, val] of set.entries()){
|
|
|
1041
1041
|
}
|
|
1042
1042
|
```
|
|
1043
1043
|
#### WeakMap
|
|
1044
|
-
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1044
|
+
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.weak-map.js).
|
|
1045
1045
|
```js
|
|
1046
1046
|
new WeakMap(iterable (entries) ?) -> weakmap
|
|
1047
1047
|
#delete(key) -> bool
|
|
@@ -1085,7 +1085,7 @@ console.log(person.getName()); // => 'Vasya'
|
|
|
1085
1085
|
for(var key in person)console.log(key); // => only 'getName'
|
|
1086
1086
|
```
|
|
1087
1087
|
#### WeakSet
|
|
1088
|
-
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1088
|
+
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.weak-set.js).
|
|
1089
1089
|
```js
|
|
1090
1090
|
new WeakSet(iterable?) -> weakset
|
|
1091
1091
|
#add(key) -> @
|
|
@@ -1117,7 +1117,7 @@ console.log(wset.has(b)); // => false
|
|
|
1117
1117
|
#### ECMAScript 6: Typed Arrays
|
|
1118
1118
|
Implementations and fixes `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.
|
|
1119
1119
|
|
|
1120
|
-
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1120
|
+
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.typed.float64-array.js).
|
|
1121
1121
|
```js
|
|
1122
1122
|
new ArrayBuffer(length) -> buffer
|
|
1123
1123
|
.isView(var) -> bool
|
|
@@ -1250,7 +1250,7 @@ for(var [key, val] of typed.entries()){
|
|
|
1250
1250
|
* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static.
|
|
1251
1251
|
|
|
1252
1252
|
#### ECMAScript 6: Reflect
|
|
1253
|
-
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1253
|
+
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es6.reflect.set-prototype-of.js).
|
|
1254
1254
|
```js
|
|
1255
1255
|
Reflect
|
|
1256
1256
|
.apply(target, thisArgument, argumentsList) -> var
|
|
@@ -1327,7 +1327,7 @@ core-js(/library)/es7/observable
|
|
|
1327
1327
|
```js
|
|
1328
1328
|
core-js(/library)/stage/4
|
|
1329
1329
|
```
|
|
1330
|
-
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1330
|
+
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).
|
|
1331
1331
|
```js
|
|
1332
1332
|
Array
|
|
1333
1333
|
#includes(var, from?) -> bool
|
|
@@ -1359,7 +1359,7 @@ core-js(/library)/fn/array/includes
|
|
|
1359
1359
|
Array(1).indexOf(undefined); // => -1
|
|
1360
1360
|
Array(1).includes(undefined); // => true
|
|
1361
1361
|
```
|
|
1362
|
-
* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1362
|
+
* `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.entries.js)
|
|
1363
1363
|
```js
|
|
1364
1364
|
Object
|
|
1365
1365
|
.values(object) -> array
|
|
@@ -1380,7 +1380,7 @@ for(let [key, value] of Object.entries({a: 1, b: 2, c: 3})){
|
|
|
1380
1380
|
console.log(value); // => 1, 2, 3
|
|
1381
1381
|
}
|
|
1382
1382
|
```
|
|
1383
|
-
* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1383
|
+
* `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.get-own-property-descriptors.js)
|
|
1384
1384
|
```js
|
|
1385
1385
|
Object
|
|
1386
1386
|
.getOwnPropertyDescriptors(object) -> object
|
|
@@ -1396,7 +1396,7 @@ var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescript
|
|
|
1396
1396
|
// Mixin:
|
|
1397
1397
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1398
1398
|
```
|
|
1399
|
-
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-start`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1399
|
+
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-start`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.pad-start.js), [`es7.string.pad-end`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.pad-end.js)
|
|
1400
1400
|
```js
|
|
1401
1401
|
String
|
|
1402
1402
|
#padStart(length, fillStr = ' ') -> string
|
|
@@ -1416,7 +1416,7 @@ core-js(/library)/fn/string/virtual/pad-end
|
|
|
1416
1416
|
'hello'.padEnd(10); // => 'hello '
|
|
1417
1417
|
'hello'.padEnd(10, '1234'); // => 'hello12341'
|
|
1418
1418
|
```
|
|
1419
|
-
* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1419
|
+
* `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.object.lookup-getter.js).
|
|
1420
1420
|
```js
|
|
1421
1421
|
Object
|
|
1422
1422
|
#__defineSetter__(key, fn) -> void
|
|
@@ -1437,7 +1437,7 @@ core-js(/library)/fn/object/lookup-setter
|
|
|
1437
1437
|
```js
|
|
1438
1438
|
core-js(/library)/stage/3
|
|
1439
1439
|
```
|
|
1440
|
-
* `global` [proposal](https://github.com/tc39/proposal-global) - modules [`es7.global`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1440
|
+
* `global` [proposal](https://github.com/tc39/proposal-global) - modules [`es7.global`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.global.js) and [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.system.global.js) (obsolete)
|
|
1441
1441
|
```js
|
|
1442
1442
|
global -> object
|
|
1443
1443
|
System
|
|
@@ -1452,7 +1452,7 @@ core-js(/library)/fn/system/global (obsolete)
|
|
|
1452
1452
|
```js
|
|
1453
1453
|
global.Array === Array; // => true
|
|
1454
1454
|
```
|
|
1455
|
-
* `Promise#finally` [proposal](https://github.com/tc39/proposal-promise-finally) - module [`es7.promise.finally`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1455
|
+
* `Promise#finally` [proposal](https://github.com/tc39/proposal-promise-finally) - module [`es7.promise.finally`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.promise.finally.js)
|
|
1456
1456
|
```js
|
|
1457
1457
|
Promise
|
|
1458
1458
|
#finally(onFinally()) -> promise
|
|
@@ -1472,7 +1472,7 @@ Promise.reject(42).finally(() => console.log('You will see it anyway'));
|
|
|
1472
1472
|
```js
|
|
1473
1473
|
core-js(/library)/stage/2
|
|
1474
1474
|
```
|
|
1475
|
-
* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1475
|
+
* `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.trim-right.js)
|
|
1476
1476
|
```js
|
|
1477
1477
|
String
|
|
1478
1478
|
#trimLeft() -> string
|
|
@@ -1497,7 +1497,7 @@ core-js(/library)/fn/string/virtual/trim-right
|
|
|
1497
1497
|
' hello '.trimRight(); // => ' hello'
|
|
1498
1498
|
```
|
|
1499
1499
|
```
|
|
1500
|
-
* `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1500
|
+
* `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.symbol.async-iterator.js)
|
|
1501
1501
|
```js
|
|
1502
1502
|
Symbol
|
|
1503
1503
|
.asyncIterator -> @@asyncIterator
|
|
@@ -1512,7 +1512,7 @@ core-js(/library)/fn/symbol/async-iterator
|
|
|
1512
1512
|
```js
|
|
1513
1513
|
core-js(/library)/stage/1
|
|
1514
1514
|
```
|
|
1515
|
-
* `Promise.try` [proposal](https://github.com/tc39/proposal-promise-try) - module [`es7.promise.try`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1515
|
+
* `Promise.try` [proposal](https://github.com/tc39/proposal-promise-try) - module [`es7.promise.try`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.promise.try.js)
|
|
1516
1516
|
```js
|
|
1517
1517
|
Promise
|
|
1518
1518
|
.try(function()) -> promise
|
|
@@ -1527,7 +1527,7 @@ Promise.try(() => 42).then(it => console.log(`Promise, resolved as ${it}`));
|
|
|
1527
1527
|
|
|
1528
1528
|
Promise.try(() => { throw 42; }).catch(it => console.log(`Promise, rejected as ${it}`));
|
|
1529
1529
|
```
|
|
1530
|
-
* `Array#flatten` and `Array#flatMap` [proposal](https://tc39.github.io/proposal-flatMap) - modules [`es7.array.flatten`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1530
|
+
* `Array#flatten` and `Array#flatMap` [proposal](https://tc39.github.io/proposal-flatMap) - modules [`es7.array.flatten`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.array.flatten.js) and [`es7.array.flat-map`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.array.flat-map.js)
|
|
1531
1531
|
```js
|
|
1532
1532
|
Array
|
|
1533
1533
|
#flatten(depthArg = 1) -> array
|
|
@@ -1548,7 +1548,7 @@ core-js(/library)/fn/array/virtual/flat-map
|
|
|
1548
1548
|
|
|
1549
1549
|
[{a: 1, b: 2}, {a: 3, b: 4}, {a: 5, b: 6}].flatMap(it => [it.a, it.b]); // => [1, 2, 3, 4, 5, 6]
|
|
1550
1550
|
```
|
|
1551
|
-
* `.of` and `.from` methods on collection constructors [proposal](https://github.com/tc39/proposal-setmap-offrom) - modules [`es7.set.of`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1551
|
+
* `.of` and `.from` methods on collection constructors [proposal](https://github.com/tc39/proposal-setmap-offrom) - modules [`es7.set.of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.set.of.js), [`es7.set.from`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.set.from.js), [`es7.map.of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.map.of.js), [`es7.map.from`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.map.from.js), [`es7.weak-set.of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.weak-set.of.js), [`es7.weak-set.from`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.weak-set.from.js), [`es7.weak-map.of`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.weak-map.of.js), [`es7.weak-map.from`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.weak-map.from.js)
|
|
1552
1552
|
```js
|
|
1553
1553
|
Set
|
|
1554
1554
|
.of(...args) -> set
|
|
@@ -1580,7 +1580,7 @@ Set.of(1, 2, 3, 2, 1); // => Set {1, 2, 3}
|
|
|
1580
1580
|
|
|
1581
1581
|
Map.from([[1, 2], [3, 4]], ([key, val]) => [key ** 2, val ** 2]); // => Map {1: 4, 9: 16}
|
|
1582
1582
|
```
|
|
1583
|
-
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1583
|
+
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.match-all.js)
|
|
1584
1584
|
```js
|
|
1585
1585
|
String
|
|
1586
1586
|
#matchAll(regexp) -> iterator
|
|
@@ -1596,7 +1596,7 @@ for(let [_, d, D] of '1111a2b3cccc'.matchAll(/(\d)(\D)/)){
|
|
|
1596
1596
|
console.log(d, D); // => 1 a, 2 b, 3 c
|
|
1597
1597
|
}
|
|
1598
1598
|
```
|
|
1599
|
-
* `Observable` [proposal](https://github.com/zenparsing/es-observable) - modules [`es7.observable`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1599
|
+
* `Observable` [proposal](https://github.com/zenparsing/es-observable) - modules [`es7.observable`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.observable.js) and [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.symbol.observable.js)
|
|
1600
1600
|
```js
|
|
1601
1601
|
new Observable(fn) -> observable
|
|
1602
1602
|
#subscribe(observer) -> subscription
|
|
@@ -1624,13 +1624,13 @@ new Observable(observer => {
|
|
|
1624
1624
|
```
|
|
1625
1625
|
* `Math.{clamp, DEG_PER_RAD, degrees, fscale, rad-per-deg, radians, scale}`
|
|
1626
1626
|
[proposal](https://github.com/rwaldron/proposal-math-extensions) - modules
|
|
1627
|
-
[`es7.math.clamp`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1628
|
-
[`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1629
|
-
[`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1630
|
-
[`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1631
|
-
[`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1632
|
-
[`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1633
|
-
[`es7.math.scale`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1627
|
+
[`es7.math.clamp`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.clamp.js),
|
|
1628
|
+
[`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.DEG_PER_RAD.js),
|
|
1629
|
+
[`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.degrees.js),
|
|
1630
|
+
[`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.fscale.js),
|
|
1631
|
+
[`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.RAD_PER_DEG.js),
|
|
1632
|
+
[`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.radians.js) and
|
|
1633
|
+
[`es7.math.scale`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.scale.js)
|
|
1634
1634
|
```js
|
|
1635
1635
|
Math
|
|
1636
1636
|
.DEG_PER_RAD -> number
|
|
@@ -1651,7 +1651,7 @@ core-js(/library)/fn/math/rad-per-deg
|
|
|
1651
1651
|
core-js(/library)/fn/math/radians
|
|
1652
1652
|
core-js(/library)/fn/math/scale
|
|
1653
1653
|
```
|
|
1654
|
-
* `Math.signbit` [proposal](http://jfbastien.github.io/papers/Math.signbit.html) - module [`es7.math.signbit`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1654
|
+
* `Math.signbit` [proposal](http://jfbastien.github.io/papers/Math.signbit.html) - module [`es7.math.signbit`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.signbit.js)
|
|
1655
1655
|
```js
|
|
1656
1656
|
Math
|
|
1657
1657
|
.signbit(x) -> bool
|
|
@@ -1674,7 +1674,7 @@ Math.signbit(-0); // => false
|
|
|
1674
1674
|
```js
|
|
1675
1675
|
core-js(/library)/stage/0
|
|
1676
1676
|
```
|
|
1677
|
-
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1677
|
+
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.string.at.js)
|
|
1678
1678
|
```js
|
|
1679
1679
|
String
|
|
1680
1680
|
#at(index) -> string
|
|
@@ -1689,7 +1689,7 @@ core-js(/library)/fn/string/virtual/at
|
|
|
1689
1689
|
'a𠮷b'.at(1); // => '𠮷'
|
|
1690
1690
|
'a𠮷b'.at(1).length; // => 2
|
|
1691
1691
|
```
|
|
1692
|
-
* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1692
|
+
* `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`)
|
|
1693
1693
|
```js
|
|
1694
1694
|
Map
|
|
1695
1695
|
#toJSON() -> array (rejected and will be removed from core-js@3)
|
|
@@ -1701,7 +1701,7 @@ Set
|
|
|
1701
1701
|
core-js(/library)/fn/map
|
|
1702
1702
|
core-js(/library)/fn/set
|
|
1703
1703
|
```
|
|
1704
|
-
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1704
|
+
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`)
|
|
1705
1705
|
```js
|
|
1706
1706
|
Error
|
|
1707
1707
|
.isError(it) -> bool (withdrawn and will be removed from core-js@3)
|
|
@@ -1710,7 +1710,7 @@ Error
|
|
|
1710
1710
|
```js
|
|
1711
1711
|
core-js(/library)/fn/error/is-error
|
|
1712
1712
|
```
|
|
1713
|
-
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1713
|
+
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.math.umulh.js)
|
|
1714
1714
|
```js
|
|
1715
1715
|
Math
|
|
1716
1716
|
.iaddh(lo0, hi0, lo1, hi1) -> int32
|
|
@@ -1725,7 +1725,7 @@ core-js(/library)/fn/math/isubh
|
|
|
1725
1725
|
core-js(/library)/fn/math/imulh
|
|
1726
1726
|
core-js(/library)/fn/math/umulh
|
|
1727
1727
|
```
|
|
1728
|
-
* `global.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1728
|
+
* `global.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.asap.js)
|
|
1729
1729
|
```js
|
|
1730
1730
|
asap(fn) -> void
|
|
1731
1731
|
```
|
|
@@ -1743,7 +1743,7 @@ asap(() => console.log('called as microtask'));
|
|
|
1743
1743
|
```js
|
|
1744
1744
|
core-js(/library)/stage/pre
|
|
1745
1745
|
```
|
|
1746
|
-
* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1746
|
+
* `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/es7.reflect.metadata.js).
|
|
1747
1747
|
```js
|
|
1748
1748
|
Reflect
|
|
1749
1749
|
.defineMetadata(metadataKey, metadataValue, target, propertyKey?) -> void
|
|
@@ -1783,7 +1783,7 @@ Reflect.getOwnMetadata('foo', O); // => 'bar'
|
|
|
1783
1783
|
core-js(/library)/web
|
|
1784
1784
|
```
|
|
1785
1785
|
#### setTimeout / setInterval
|
|
1786
|
-
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1786
|
+
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/web.timers.js). Additional arguments fix for IE9-.
|
|
1787
1787
|
```js
|
|
1788
1788
|
setTimeout(fn(...args), time, ...args) -> id
|
|
1789
1789
|
setInterval(fn(...args), time, ...args) -> id
|
|
@@ -1801,7 +1801,7 @@ setTimeout(log.bind(null, 42), 1000);
|
|
|
1801
1801
|
setTimeout(log, 1000, 42);
|
|
1802
1802
|
```
|
|
1803
1803
|
#### setImmediate
|
|
1804
|
-
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1804
|
+
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.
|
|
1805
1805
|
```js
|
|
1806
1806
|
setImmediate(fn(...args), ...args) -> id
|
|
1807
1807
|
clearImmediate(id) -> void
|
|
@@ -1823,7 +1823,7 @@ clearImmediate(setImmediate(function(){
|
|
|
1823
1823
|
}));
|
|
1824
1824
|
```
|
|
1825
1825
|
#### Iterable DOM collections
|
|
1826
|
-
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 mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1826
|
+
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 mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/web.dom.iterable.js):
|
|
1827
1827
|
```js
|
|
1828
1828
|
{
|
|
1829
1829
|
CSSRuleList,
|
|
@@ -1889,7 +1889,7 @@ for(var [index, {id}] of document.querySelectorAll('*').entries()){
|
|
|
1889
1889
|
core-js(/library)/core
|
|
1890
1890
|
```
|
|
1891
1891
|
#### Object
|
|
1892
|
-
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1892
|
+
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.object.make.js).
|
|
1893
1893
|
```js
|
|
1894
1894
|
Object
|
|
1895
1895
|
.isObject(var) -> bool
|
|
@@ -2002,7 +2002,7 @@ console.log(vector.xy); // => 15.811388300841896
|
|
|
2002
2002
|
console.log(vector.xyz); // => 25.495097567963924
|
|
2003
2003
|
```
|
|
2004
2004
|
#### Dict
|
|
2005
|
-
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2005
|
+
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries).
|
|
2006
2006
|
```js
|
|
2007
2007
|
[new] Dict(iterable (entries) | object ?) -> dict
|
|
2008
2008
|
.isDict(var) -> bool
|
|
@@ -2155,7 +2155,7 @@ Dict.reduce(dict, function(memo, it){
|
|
|
2155
2155
|
}, ''); // => '123'
|
|
2156
2156
|
```
|
|
2157
2157
|
#### Partial application
|
|
2158
|
-
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2158
|
+
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.function.part.js).
|
|
2159
2159
|
```js
|
|
2160
2160
|
Function
|
|
2161
2161
|
#part(...args | _) -> fn(...args)
|
|
@@ -2185,7 +2185,7 @@ fn2(1, 3, 5); // => 1, 2, 3, 4, 5
|
|
|
2185
2185
|
fn2(1); // => 1, 2, undefined, 4
|
|
2186
2186
|
```
|
|
2187
2187
|
#### Number Iterator
|
|
2188
|
-
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2188
|
+
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.number.iterator.js).
|
|
2189
2189
|
```js
|
|
2190
2190
|
Number
|
|
2191
2191
|
#@@iterator() -> iterator
|
|
@@ -2210,7 +2210,7 @@ Array.from(10, function(it){
|
|
|
2210
2210
|
}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]
|
|
2211
2211
|
```
|
|
2212
2212
|
#### Escaping strings
|
|
2213
|
-
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2213
|
+
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.string.unescape-html.js).
|
|
2214
2214
|
```js
|
|
2215
2215
|
RegExp
|
|
2216
2216
|
.escape(str) -> str
|
|
@@ -2236,7 +2236,7 @@ RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^
|
|
|
2236
2236
|
'<script>doSomething();</script>'.unescapeHTML(); // => '<script>doSomething();</script>'
|
|
2237
2237
|
```
|
|
2238
2238
|
#### delay
|
|
2239
|
-
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2239
|
+
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).
|
|
2240
2240
|
```js
|
|
2241
2241
|
delay(ms) -> promise
|
|
2242
2242
|
```
|
|
@@ -2257,7 +2257,7 @@ delay(1e3).then(() => console.log('after 1 sec'));
|
|
|
2257
2257
|
})();
|
|
2258
2258
|
```
|
|
2259
2259
|
#### Helpers for iterators
|
|
2260
|
-
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
2260
|
+
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.6.12/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:
|
|
2261
2261
|
```js
|
|
2262
2262
|
core
|
|
2263
2263
|
.isIterable(var) -> bool
|