core-js 2.2.2 → 2.3.0
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 +11 -0
- package/README.md +70 -65
- package/bower.json +1 -1
- package/build/config.js +3 -0
- package/client/core.js +1176 -1100
- package/client/core.min.js +4 -4
- package/client/core.min.js.map +1 -1
- package/client/library.js +1112 -1045
- package/client/library.min.js +4 -4
- package/client/library.min.js.map +1 -1
- package/client/shim.js +1118 -1042
- package/client/shim.min.js +4 -4
- package/client/shim.min.js.map +1 -1
- package/es7/asap.js +2 -0
- package/es7/index.js +3 -0
- package/es7/symbol.js +3 -0
- package/fn/asap.js +2 -0
- package/fn/symbol/async-iterator.js +2 -0
- package/fn/symbol/has-instance.js +2 -1
- package/fn/symbol/index.js +2 -0
- package/fn/symbol/is-concat-spreadable.js +1 -1
- package/fn/symbol/iterator.js +1 -1
- package/fn/symbol/match.js +1 -1
- package/fn/symbol/observable.js +2 -0
- package/fn/symbol/replace.js +1 -1
- package/fn/symbol/search.js +1 -1
- package/fn/symbol/species.js +1 -1
- package/fn/symbol/split.js +1 -1
- package/fn/symbol/to-primitive.js +1 -1
- package/fn/symbol/to-string-tag.js +1 -1
- package/fn/symbol/unscopables.js +1 -1
- package/library/es7/asap.js +2 -0
- package/library/es7/index.js +3 -0
- package/library/es7/symbol.js +3 -0
- package/library/fn/asap.js +2 -0
- package/library/fn/symbol/async-iterator.js +2 -0
- package/library/fn/symbol/has-instance.js +2 -1
- package/library/fn/symbol/index.js +2 -0
- package/library/fn/symbol/is-concat-spreadable.js +1 -1
- package/library/fn/symbol/iterator.js +1 -1
- package/library/fn/symbol/match.js +1 -1
- package/library/fn/symbol/observable.js +2 -0
- package/library/fn/symbol/replace.js +1 -1
- package/library/fn/symbol/search.js +1 -1
- package/library/fn/symbol/species.js +1 -1
- package/library/fn/symbol/split.js +1 -1
- package/library/fn/symbol/to-primitive.js +1 -1
- package/library/fn/symbol/to-string-tag.js +1 -1
- package/library/fn/symbol/unscopables.js +1 -1
- package/library/modules/_array-species-constructor.js +16 -0
- package/library/modules/_array-species-create.js +3 -13
- package/library/modules/_core.js +1 -1
- package/library/modules/_microtask.js +58 -48
- package/library/modules/_string-pad.js +1 -2
- package/library/modules/_wks-define.js +9 -0
- package/library/modules/_wks-ext.js +1 -0
- package/library/modules/_wks.js +5 -2
- package/library/modules/es6.array.filter.js +9 -9
- package/library/modules/es6.promise.js +1 -1
- package/library/modules/es6.symbol.js +45 -53
- package/library/modules/es7.asap.js +12 -0
- package/library/modules/es7.symbol.async-iterator.js +1 -0
- package/library/modules/es7.symbol.observable.js +1 -0
- package/library/shim.js +3 -0
- package/library/stage/0.js +1 -0
- package/library/stage/1.js +2 -2
- package/library/stage/2.js +3 -1
- package/library/stage/3.js +1 -3
- package/library/stage/4.js +3 -1
- package/modules/_array-species-constructor.js +16 -0
- package/modules/_array-species-create.js +3 -13
- package/modules/_core.js +1 -1
- package/modules/_microtask.js +58 -48
- package/modules/_string-pad.js +1 -2
- package/modules/_wks-define.js +9 -0
- package/modules/_wks-ext.js +1 -0
- package/modules/_wks.js +5 -2
- package/modules/es6.array.filter.js +9 -9
- package/modules/es6.function.name.js +13 -4
- package/modules/es6.promise.js +1 -1
- package/modules/es6.symbol.js +45 -53
- package/modules/es7.asap.js +12 -0
- package/modules/es7.symbol.async-iterator.js +1 -0
- package/modules/es7.symbol.observable.js +1 -0
- package/package.json +3 -3
- package/shim.js +3 -0
- package/stage/0.js +1 -0
- package/stage/1.js +2 -2
- package/stage/2.js +3 -1
- package/stage/3.js +1 -3
- package/stage/4.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
## Changelog
|
|
2
|
+
##### 2.3.0 - 2016.04.24
|
|
3
|
+
- Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask)
|
|
4
|
+
- Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration)
|
|
5
|
+
- Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable)
|
|
6
|
+
- `String#{padStart, padEnd}` returns original string if filler is empty string, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend)
|
|
7
|
+
- `Object.values` and `Object.entries` moved to stage 4 from 3, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries)
|
|
8
|
+
- `System.global` moved to stage 2 from 1, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal)
|
|
9
|
+
- `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson)
|
|
10
|
+
- `Error.isError` withdrawn and will be removed from the next major release, [T39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror)
|
|
11
|
+
- Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193)
|
|
12
|
+
|
|
2
13
|
##### 2.2.2 - 2016.04.06
|
|
3
14
|
- Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316)
|
|
4
15
|
- Added fixes for some `Math` methods in Tor Browser
|
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ core.Promise.resolve(32).then(x => console.log(x)); // => 32
|
|
|
22
22
|
core.setImmediate(x => console.log(x), 42); // => 42
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
### Index
|
|
25
26
|
- [Usage](#usage)
|
|
26
27
|
- [Basic](#basic)
|
|
27
28
|
- [CommonJS](#commonjs)
|
|
@@ -76,9 +77,9 @@ require('core-js/shim');
|
|
|
76
77
|
```
|
|
77
78
|
If you need complete build for browser, use builds from `core-js/client` path:
|
|
78
79
|
|
|
79
|
-
* [default](https://raw.githack.com/zloirock/core-js/v2.
|
|
80
|
-
* [as a library](https://raw.githack.com/zloirock/core-js/v2.
|
|
81
|
-
* [shim only](https://raw.githack.com/zloirock/core-js/v2.
|
|
80
|
+
* [default](https://raw.githack.com/zloirock/core-js/v2.3.0/client/core.min.js): Includes all features, standard and non-standard.
|
|
81
|
+
* [as a library](https://raw.githack.com/zloirock/core-js/v2.3.0/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)).
|
|
82
|
+
* [shim only](https://raw.githack.com/zloirock/core-js/v2.3.0/client/shim.min.js): Only includes the standard methods.
|
|
82
83
|
|
|
83
84
|
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.
|
|
84
85
|
|
|
@@ -228,11 +229,11 @@ core-js(/library)/es5
|
|
|
228
229
|
core-js(/library)/es6
|
|
229
230
|
```
|
|
230
231
|
#### ECMAScript 6: Object
|
|
231
|
-
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.
|
|
232
|
+
Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.to-string.js).
|
|
232
233
|
|
|
233
|
-
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.
|
|
234
|
+
In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.get-own-property-names.js).
|
|
234
235
|
|
|
235
|
-
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.
|
|
236
|
+
Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.object.es6.object.define-properties.js).
|
|
236
237
|
```js
|
|
237
238
|
Object
|
|
238
239
|
.assign(target, ...src) -> target
|
|
@@ -300,7 +301,7 @@ Object.keys('qwe'); // => ['0', '1', '2']
|
|
|
300
301
|
Object.getPrototypeOf('qwe') === String.prototype; // => true
|
|
301
302
|
```
|
|
302
303
|
#### ECMAScript 6: Function
|
|
303
|
-
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.
|
|
304
|
+
Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.function.bind.js).
|
|
304
305
|
```js
|
|
305
306
|
Function
|
|
306
307
|
#bind(object, ...args) -> boundFn(...args)
|
|
@@ -322,7 +323,7 @@ core-js/fn/function/virtual/bind
|
|
|
322
323
|
console.log.bind(console, 42)(43); // => 42 43
|
|
323
324
|
```
|
|
324
325
|
#### ECMAScript 6: Array
|
|
325
|
-
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.
|
|
326
|
+
Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.array.sort.js).
|
|
326
327
|
```js
|
|
327
328
|
Array
|
|
328
329
|
.from(iterable | array-like, mapFn(val, index)?, that) -> array
|
|
@@ -434,9 +435,9 @@ Array(5).fill(42); // => [42, 42, 42, 42, 42]
|
|
|
434
435
|
[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]
|
|
435
436
|
```
|
|
436
437
|
#### ECMAScript 6: String
|
|
437
|
-
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.
|
|
438
|
+
Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.trim.js).
|
|
438
439
|
|
|
439
|
-
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.
|
|
440
|
+
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.3.0/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.string.sup.js).
|
|
440
441
|
```js
|
|
441
442
|
String
|
|
442
443
|
.fromCodePoint(...codePoints) -> str
|
|
@@ -535,9 +536,9 @@ String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'
|
|
|
535
536
|
'baz'.link('http://example.com'); // => '<a href="http://example.com">baz</a>'
|
|
536
537
|
```
|
|
537
538
|
#### ECMAScript 6: RegExp
|
|
538
|
-
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.
|
|
539
|
+
Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.flags.js).
|
|
539
540
|
|
|
540
|
-
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.
|
|
541
|
+
Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.regexp.split.js).
|
|
541
542
|
```
|
|
542
543
|
[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)
|
|
543
544
|
#flags -> str (IE9+)
|
|
@@ -578,12 +579,12 @@ RegExp(/./g, 'm'); // => /./m
|
|
|
578
579
|
RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar'
|
|
579
580
|
```
|
|
580
581
|
#### ECMAScript 6: Number
|
|
581
|
-
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.
|
|
582
|
+
Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):
|
|
582
583
|
```js
|
|
583
584
|
Number('0b1010101'); // => 85
|
|
584
585
|
Number('0o7654321'); // => 2054353
|
|
585
586
|
```
|
|
586
|
-
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.
|
|
587
|
+
Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.parse-float.js).
|
|
587
588
|
```js
|
|
588
589
|
[new] Number(var) -> number | number object
|
|
589
590
|
.isFinite(num) -> bool
|
|
@@ -619,7 +620,7 @@ core-js(/library)/fn/parse-float
|
|
|
619
620
|
core-js(/library)/fn/parse-int
|
|
620
621
|
```
|
|
621
622
|
#### ECMAScript 6: Math
|
|
622
|
-
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.
|
|
623
|
+
Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.math.trunc.js).
|
|
623
624
|
```js
|
|
624
625
|
Math
|
|
625
626
|
.acosh(num) -> num
|
|
@@ -662,7 +663,7 @@ core-js(/library)/fn/math/tanh
|
|
|
662
663
|
core-js(/library)/fn/math/trunc
|
|
663
664
|
```
|
|
664
665
|
#### ECMAScript 6: Date
|
|
665
|
-
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.
|
|
666
|
+
Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.date.to-primitive.js).
|
|
666
667
|
```js
|
|
667
668
|
Date
|
|
668
669
|
.now() -> int
|
|
@@ -686,7 +687,7 @@ new Date(NaN).toString(); // => 'Invalid Date'
|
|
|
686
687
|
```
|
|
687
688
|
|
|
688
689
|
#### ECMAScript 6: Promise
|
|
689
|
-
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.
|
|
690
|
+
Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.promise.js).
|
|
690
691
|
```js
|
|
691
692
|
new Promise(executor(resolve(var), reject(var))) -> promise
|
|
692
693
|
#then(resolved(var), rejected(var)) -> promise
|
|
@@ -806,7 +807,7 @@ setTimeout(() => p.catch(_ => _), 1e3);
|
|
|
806
807
|
```
|
|
807
808
|
|
|
808
809
|
#### ECMAScript 6: Symbol
|
|
809
|
-
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.
|
|
810
|
+
Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.symbol.js).
|
|
810
811
|
```js
|
|
811
812
|
Symbol(description?) -> symbol
|
|
812
813
|
.hasInstance -> @@hasInstance
|
|
@@ -918,7 +919,7 @@ for(var key in o2)console.log(key); // nothing
|
|
|
918
919
|
#### ECMAScript 6: Collections
|
|
919
920
|
`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).
|
|
920
921
|
#### Map
|
|
921
|
-
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.
|
|
922
|
+
Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.map.js).
|
|
922
923
|
```js
|
|
923
924
|
new Map(iterable (entries) ?) -> map
|
|
924
925
|
#clear() -> void
|
|
@@ -972,7 +973,7 @@ for(var [key, val] of map.entries()){
|
|
|
972
973
|
}
|
|
973
974
|
```
|
|
974
975
|
#### Set
|
|
975
|
-
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.
|
|
976
|
+
Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.set.js).
|
|
976
977
|
```js
|
|
977
978
|
new Set(iterable?) -> set
|
|
978
979
|
#add(key) -> @
|
|
@@ -1016,7 +1017,7 @@ for(var [key, val] of set.entries()){
|
|
|
1016
1017
|
}
|
|
1017
1018
|
```
|
|
1018
1019
|
#### WeakMap
|
|
1019
|
-
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.
|
|
1020
|
+
Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.weak-map.js).
|
|
1020
1021
|
```js
|
|
1021
1022
|
new WeakMap(iterable (entries) ?) -> weakmap
|
|
1022
1023
|
#delete(key) -> bool
|
|
@@ -1060,7 +1061,7 @@ console.log(person.getName()); // => 'Vasya'
|
|
|
1060
1061
|
for(var key in person)console.log(key); // => only 'getName'
|
|
1061
1062
|
```
|
|
1062
1063
|
#### WeakSet
|
|
1063
|
-
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.
|
|
1064
|
+
Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.weak-set.js).
|
|
1064
1065
|
```js
|
|
1065
1066
|
new WeakSet(iterable?) -> weakset
|
|
1066
1067
|
#add(key) -> @
|
|
@@ -1092,7 +1093,7 @@ console.log(wset.has(b)); // => false
|
|
|
1092
1093
|
#### ECMAScript 6: Typed Arrays
|
|
1093
1094
|
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.
|
|
1094
1095
|
|
|
1095
|
-
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.
|
|
1096
|
+
Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.typed.float64-array.js).
|
|
1096
1097
|
```js
|
|
1097
1098
|
new ArrayBuffer(length) -> buffer
|
|
1098
1099
|
.isView(var) -> bool
|
|
@@ -1226,14 +1227,14 @@ for(var [key, val] of typed.entries()){
|
|
|
1226
1227
|
* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static.
|
|
1227
1228
|
|
|
1228
1229
|
#### ECMAScript 6: Reflect
|
|
1229
|
-
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.
|
|
1230
|
+
Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es6.reflect.set-prototype-of.js).
|
|
1230
1231
|
```js
|
|
1231
1232
|
Reflect
|
|
1232
1233
|
.apply(target, thisArgument, argumentsList) -> var
|
|
1233
1234
|
.construct(target, argumentsList, newTarget?) -> object
|
|
1234
1235
|
.defineProperty(target, propertyKey, attributes) -> bool
|
|
1235
1236
|
.deleteProperty(target, propertyKey) -> bool
|
|
1236
|
-
.enumerate(target) -> iterator (
|
|
1237
|
+
.enumerate(target) -> iterator (removed from the spec and will be removed from core-js@3)
|
|
1237
1238
|
.get(target, propertyKey, receiver?) -> var
|
|
1238
1239
|
.getOwnPropertyDescriptor(target, propertyKey) -> desc
|
|
1239
1240
|
.getPrototypeOf(target) -> object | null
|
|
@@ -1294,13 +1295,16 @@ core-js(/library)/es7/reflect
|
|
|
1294
1295
|
```
|
|
1295
1296
|
`core-js/stage/4` entry point contains only stage 4 proposals, `core-js/stage/3` - stage 3 and stage 4, etc.
|
|
1296
1297
|
##### Stage 4:
|
|
1297
|
-
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.
|
|
1298
|
-
* `Object
|
|
1298
|
+
* `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).
|
|
1299
|
+
* `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.3.0/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.entries.js)
|
|
1300
|
+
* `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.3.0/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.object.lookup-getter.js).
|
|
1299
1301
|
|
|
1300
1302
|
[*CommonJS entry points:*](#commonjs)
|
|
1301
1303
|
```js
|
|
1302
1304
|
core-js(/library)/stage/4
|
|
1303
1305
|
core-js(/library)/fn/array/includes
|
|
1306
|
+
core-js(/library)/fn/object/values
|
|
1307
|
+
core-js(/library)/fn/object/entries
|
|
1304
1308
|
core-js(/library)/fn/object/define-getter
|
|
1305
1309
|
core-js(/library)/fn/object/define-setter
|
|
1306
1310
|
core-js(/library)/fn/object/lookup-getter
|
|
@@ -1308,15 +1312,13 @@ core-js(/library)/fn/object/lookup-setter
|
|
|
1308
1312
|
```
|
|
1309
1313
|
|
|
1310
1314
|
##### Stage 3:
|
|
1311
|
-
* `Object.
|
|
1312
|
-
* `
|
|
1313
|
-
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v2.2.2/modules/es7.string.pad-right.js)
|
|
1315
|
+
* `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.3.0/modules/es7.object.get-own-property-descriptors.js)
|
|
1316
|
+
* `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.pad-right.js)
|
|
1314
1317
|
|
|
1315
1318
|
[*CommonJS entry points:*](#commonjs)
|
|
1316
1319
|
```js
|
|
1317
1320
|
core-js(/library)/stage/3
|
|
1318
|
-
core-js(/library)/fn/object/
|
|
1319
|
-
core-js(/library)/fn/object/entries
|
|
1321
|
+
core-js(/library)/fn/object/get-own-property-descriptors
|
|
1320
1322
|
core-js(/library)/fn/string/pad-start
|
|
1321
1323
|
core-js(/library)/fn/string/pad-end
|
|
1322
1324
|
core-js(/library)/fn/string/virtual/pad-start
|
|
@@ -1324,17 +1326,20 @@ core-js(/library)/fn/string/virtual/pad-end
|
|
|
1324
1326
|
```
|
|
1325
1327
|
|
|
1326
1328
|
##### Stage 2:
|
|
1327
|
-
|
|
1329
|
+
* `System.global` [proposal](https://github.com/tc39/proposal-global) - module [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.system.global.js)
|
|
1330
|
+
* `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.3.0/modules/es7.symbol.async-iterator.js)
|
|
1328
1331
|
|
|
1329
1332
|
[*CommonJS entry points:*](#commonjs)
|
|
1330
1333
|
```js
|
|
1331
1334
|
core-js(/library)/stage/2
|
|
1335
|
+
core-js(/library)/fn/system/global
|
|
1336
|
+
core-js(/library)/fn/symbol/async-iterator
|
|
1332
1337
|
```
|
|
1333
1338
|
|
|
1334
1339
|
##### Stage 1:
|
|
1335
|
-
* `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.
|
|
1336
|
-
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.
|
|
1337
|
-
* `
|
|
1340
|
+
* `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.3.0/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.trim-right.js)
|
|
1341
|
+
* `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.match-all.js)
|
|
1342
|
+
* `Symbol.observable` for [observables proposal](https://github.com/zenparsing/es-observable) - module [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.symbol.observable.js)
|
|
1338
1343
|
|
|
1339
1344
|
[*CommonJS entry points:*](#commonjs)
|
|
1340
1345
|
```js
|
|
@@ -1349,21 +1354,21 @@ core-js(/library)/fn/string/virtual/trim-end
|
|
|
1349
1354
|
core-js(/library)/fn/string/virtual/trim-left
|
|
1350
1355
|
core-js(/library)/fn/string/virtual/trim-right
|
|
1351
1356
|
core-js(/library)/fn/string/virtual/match-all
|
|
1352
|
-
core-js(/library)/fn/
|
|
1357
|
+
core-js(/library)/fn/symbol/observable
|
|
1353
1358
|
```
|
|
1354
1359
|
|
|
1355
1360
|
##### Stage 0:
|
|
1356
|
-
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.
|
|
1357
|
-
* `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.
|
|
1358
|
-
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.
|
|
1359
|
-
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.
|
|
1361
|
+
* `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.string.at.js)
|
|
1362
|
+
* `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.3.0/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`)
|
|
1363
|
+
* `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`)
|
|
1364
|
+
* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.math.umulh.js)
|
|
1365
|
+
* `glogal.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.3.0/modules/es7.asap.js)
|
|
1360
1366
|
|
|
1361
1367
|
[*CommonJS entry points:*](#commonjs)
|
|
1362
1368
|
```js
|
|
1363
1369
|
core-js(/library)/stage/0
|
|
1364
1370
|
core-js(/library)/fn/string/at
|
|
1365
1371
|
core-js(/library)/fn/string/virtual/at
|
|
1366
|
-
core-js(/library)/fn/object/get-own-property-descriptors
|
|
1367
1372
|
core-js(/library)/fn/map
|
|
1368
1373
|
core-js(/library)/fn/set
|
|
1369
1374
|
core-js(/library)/fn/error/is-error
|
|
@@ -1371,10 +1376,11 @@ core-js(/library)/fn/math/iaddh
|
|
|
1371
1376
|
core-js(/library)/fn/math/isubh
|
|
1372
1377
|
core-js(/library)/fn/math/imulh
|
|
1373
1378
|
core-js(/library)/fn/math/umulh
|
|
1379
|
+
core-js(/library)/fn/asap
|
|
1374
1380
|
```
|
|
1375
1381
|
|
|
1376
1382
|
##### Pre-stage 0 proposals:
|
|
1377
|
-
* `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.
|
|
1383
|
+
* `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.3.0/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/es7.reflect.metadata.js).
|
|
1378
1384
|
|
|
1379
1385
|
[*CommonJS entry points:*](#commonjs)
|
|
1380
1386
|
```js
|
|
@@ -1391,6 +1397,7 @@ core-js(/library)/fn/reflect/metadata
|
|
|
1391
1397
|
```
|
|
1392
1398
|
|
|
1393
1399
|
```js
|
|
1400
|
+
asap(fn) -> void
|
|
1394
1401
|
Array
|
|
1395
1402
|
#includes(var, from?) -> bool
|
|
1396
1403
|
String
|
|
@@ -1410,16 +1417,17 @@ Object
|
|
|
1410
1417
|
#__defineGetter__(key, fn) -> void
|
|
1411
1418
|
#__lookupSetter__(key) -> fn | void
|
|
1412
1419
|
#__lookupGetter__(key) -> fn | void
|
|
1413
|
-
RegExp
|
|
1414
|
-
.escape(str) -> str
|
|
1415
1420
|
Map
|
|
1416
|
-
#toJSON() -> array
|
|
1421
|
+
#toJSON() -> array (rejected and will be removed from core-js@3)
|
|
1417
1422
|
Set
|
|
1418
|
-
#toJSON() -> array
|
|
1423
|
+
#toJSON() -> array (rejected and will be removed from core-js@3)
|
|
1419
1424
|
System
|
|
1420
1425
|
.global -> object
|
|
1426
|
+
Symbol
|
|
1427
|
+
.asyncIterator -> @@asyncIterator
|
|
1428
|
+
.observable -> @@observable
|
|
1421
1429
|
Error
|
|
1422
|
-
.isError(it) -> bool
|
|
1430
|
+
.isError(it) -> bool (withdrawn and will be removed from core-js@3)
|
|
1423
1431
|
Math
|
|
1424
1432
|
.iaddh(lo0, hi0, lo1, hi1) -> int32
|
|
1425
1433
|
.isubh(lo0, hi0, lo1, hi1) -> int32
|
|
@@ -1436,8 +1444,10 @@ Reflect
|
|
|
1436
1444
|
.getOwnMetadataKeys(target, propertyKey?) -> array
|
|
1437
1445
|
.metadata(metadataKey, metadataValue) -> decorator(target, targetKey?) -> void
|
|
1438
1446
|
```
|
|
1439
|
-
[*Examples*](http://goo.gl/
|
|
1447
|
+
[*Examples*](http://goo.gl/DVGima):
|
|
1440
1448
|
```js
|
|
1449
|
+
asap(() => console.log('called as microtask'));
|
|
1450
|
+
|
|
1441
1451
|
[1, 2, 3].includes(2); // => true
|
|
1442
1452
|
[1, 2, 3].includes(4); // => false
|
|
1443
1453
|
[1, 2, 3].includes(2, 2); // => false
|
|
@@ -1470,13 +1480,8 @@ var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescript
|
|
|
1470
1480
|
// Mixin:
|
|
1471
1481
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1472
1482
|
|
|
1473
|
-
JSON.stringify(new Map([['a', 'b'], ['c', 'd']])); // => '[["a","b"],["c","d"]]'
|
|
1474
|
-
JSON.stringify(new Set([1, 2, 3, 2, 1])); // => '[1,2,3]'
|
|
1475
|
-
|
|
1476
1483
|
System.global.Array === Array; // => true
|
|
1477
1484
|
|
|
1478
|
-
Error.isError(new TypeError); // => true
|
|
1479
|
-
|
|
1480
1485
|
var O = {};
|
|
1481
1486
|
Reflect.defineMetadata('foo', 'bar', O);
|
|
1482
1487
|
Reflect.ownKeys(O); // => []
|
|
@@ -1489,7 +1494,7 @@ Reflect.getOwnMetadata('foo', O); // => 'bar'
|
|
|
1489
1494
|
core-js(/library)/web
|
|
1490
1495
|
```
|
|
1491
1496
|
#### setTimeout / setInterval
|
|
1492
|
-
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.
|
|
1497
|
+
Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/web.timers.js). Additional arguments fix for IE9-.
|
|
1493
1498
|
```js
|
|
1494
1499
|
setTimeout(fn(...args), time, ...args) -> id
|
|
1495
1500
|
setInterval(fn(...args), time, ...args) -> id
|
|
@@ -1507,7 +1512,7 @@ setTimeout(log.bind(null, 42), 1000);
|
|
|
1507
1512
|
setTimeout(log, 1000, 42);
|
|
1508
1513
|
```
|
|
1509
1514
|
#### setImmediate
|
|
1510
|
-
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.
|
|
1515
|
+
Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.
|
|
1511
1516
|
```js
|
|
1512
1517
|
setImmediate(fn(...args), ...args) -> id
|
|
1513
1518
|
clearImmediate(id) -> void
|
|
@@ -1529,7 +1534,7 @@ clearImmediate(setImmediate(function(){
|
|
|
1529
1534
|
}));
|
|
1530
1535
|
```
|
|
1531
1536
|
#### Iterable DOM collections
|
|
1532
|
-
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.
|
|
1537
|
+
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.3.0/modules/web.dom.iterable.js):
|
|
1533
1538
|
```js
|
|
1534
1539
|
{
|
|
1535
1540
|
NodeList,
|
|
@@ -1564,7 +1569,7 @@ for(var [index, {id}] of document.querySelectorAll('*').entries()){
|
|
|
1564
1569
|
core-js(/library)/core
|
|
1565
1570
|
```
|
|
1566
1571
|
#### Object
|
|
1567
|
-
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.
|
|
1572
|
+
Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.object.make.js).
|
|
1568
1573
|
```js
|
|
1569
1574
|
Object
|
|
1570
1575
|
.isObject(var) -> bool
|
|
@@ -1677,7 +1682,7 @@ console.log(vector.xy); // => 15.811388300841896
|
|
|
1677
1682
|
console.log(vector.xyz); // => 25.495097567963924
|
|
1678
1683
|
```
|
|
1679
1684
|
#### Dict
|
|
1680
|
-
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.
|
|
1685
|
+
Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.3.0/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).
|
|
1681
1686
|
```js
|
|
1682
1687
|
[new] Dict(iterable (entries) | object ?) -> dict
|
|
1683
1688
|
.isDict(var) -> bool
|
|
@@ -1830,7 +1835,7 @@ Dict.reduce(dict, function(memo, it){
|
|
|
1830
1835
|
}, ''); // => '123'
|
|
1831
1836
|
```
|
|
1832
1837
|
#### Partial application
|
|
1833
|
-
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.
|
|
1838
|
+
Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.function.part.js).
|
|
1834
1839
|
```js
|
|
1835
1840
|
Function
|
|
1836
1841
|
#part(...args | _) -> fn(...args)
|
|
@@ -1860,7 +1865,7 @@ fn2(1, 3, 5); // => 1, 2, 3, 4, 5
|
|
|
1860
1865
|
fn2(1); // => 1, 2, undefined, 4
|
|
1861
1866
|
```
|
|
1862
1867
|
#### Number Iterator
|
|
1863
|
-
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.
|
|
1868
|
+
Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.number.iterator.js).
|
|
1864
1869
|
```js
|
|
1865
1870
|
Number
|
|
1866
1871
|
#@@iterator() -> iterator
|
|
@@ -1885,7 +1890,7 @@ Array.from(10, function(it){
|
|
|
1885
1890
|
}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]
|
|
1886
1891
|
```
|
|
1887
1892
|
#### Escaping strings
|
|
1888
|
-
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.
|
|
1893
|
+
Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.string.unescape-html.js).
|
|
1889
1894
|
```js
|
|
1890
1895
|
RegExp
|
|
1891
1896
|
.escape(str) -> str
|
|
@@ -1911,7 +1916,7 @@ RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^
|
|
|
1911
1916
|
'<script>doSomething();</script>'.unescapeHTML(); // => '<script>doSomething();</script>'
|
|
1912
1917
|
```
|
|
1913
1918
|
#### delay
|
|
1914
|
-
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.
|
|
1919
|
+
Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).
|
|
1915
1920
|
```js
|
|
1916
1921
|
delay(ms) -> promise
|
|
1917
1922
|
```
|
|
@@ -1927,12 +1932,12 @@ delay(1e3).then(() => console.log('after 1 sec'));
|
|
|
1927
1932
|
(async () => {
|
|
1928
1933
|
await delay(3e3);
|
|
1929
1934
|
console.log('after 3 sec');
|
|
1930
|
-
|
|
1935
|
+
|
|
1931
1936
|
while(await delay(3e3))console.log('each 3 sec');
|
|
1932
1937
|
})();
|
|
1933
1938
|
```
|
|
1934
1939
|
#### Helpers for iterators
|
|
1935
|
-
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.
|
|
1940
|
+
Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.3.0/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:
|
|
1936
1941
|
```js
|
|
1937
1942
|
core
|
|
1938
1943
|
.isIterable(var) -> bool
|
package/bower.json
CHANGED
package/build/config.js
CHANGED
|
@@ -144,6 +144,8 @@ module.exports = {
|
|
|
144
144
|
'es7.string.trim-left',
|
|
145
145
|
'es7.string.trim-right',
|
|
146
146
|
'es7.string.match-all',
|
|
147
|
+
'es7.symbol.async-iterator',
|
|
148
|
+
'es7.symbol.observable',
|
|
147
149
|
'es7.object.get-own-property-descriptors',
|
|
148
150
|
'es7.object.values',
|
|
149
151
|
'es7.object.entries',
|
|
@@ -168,6 +170,7 @@ module.exports = {
|
|
|
168
170
|
'es7.reflect.has-metadata',
|
|
169
171
|
'es7.reflect.has-own-metadata',
|
|
170
172
|
'es7.reflect.metadata',
|
|
173
|
+
'es7.asap',
|
|
171
174
|
'web.immediate',
|
|
172
175
|
'web.dom.iterable',
|
|
173
176
|
'web.timers',
|