core-js 2.6.4 → 2.6.8
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 +14 -0
- package/README.md +82 -64
- package/bower.json +1 -1
- package/client/core.js +113 -88
- package/client/core.min.js +4 -4
- package/client/core.min.js.map +1 -1
- package/client/library.js +82 -57
- package/client/library.min.js +4 -4
- package/client/library.min.js.map +1 -1
- package/client/shim.js +35 -10
- package/client/shim.min.js +4 -4
- package/client/shim.min.js.map +1 -1
- package/library/modules/_core.js +1 -1
- package/library/modules/_object-assign.js +5 -1
- package/library/modules/_object-to-array.js +8 -3
- package/library/modules/es6.symbol.js +14 -2
- package/library/modules/es7.string.pad-end.js +3 -1
- package/library/modules/es7.string.pad-start.js +3 -1
- package/modules/_core.js +1 -1
- package/modules/_object-assign.js +5 -1
- package/modules/_object-to-array.js +8 -3
- package/modules/es6.symbol.js +14 -2
- package/modules/es7.string.pad-end.js +3 -1
- package/modules/es7.string.pad-start.js +3 -1
- package/package.json +3 -2
- package/scripts/postinstall.js +12 -0
package/README.md
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
# core-js
|
|
2
2
|
|
|
3
|
-
[](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://www.npmjs.com/package/core-js) [](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [](https://travis-ci.org/zloirock/core-js) [](https://david-dm.org/zloirock/core-js?type=dev)
|
|
4
|
-
|
|
3
|
+
[](#raising-funds) [](#raising-funds) [](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://www.npmjs.com/package/core-js) [](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [](https://travis-ci.org/zloirock/core-js) [](https://david-dm.org/zloirock/core-js?type=dev)
|
|
4
|
+
## As advertising: the author is looking for a good job :)
|
|
5
|
+
|
|
6
|
+
## [core-js@3, babel and a look into the future](https://github.com/zloirock/core-js/tree/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md)
|
|
7
|
+
|
|
8
|
+
## Raising funds
|
|
9
|
+
|
|
10
|
+
`core-js` isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer [**on Open Collective**](https://opencollective.com/core-js) or [**on Patreon**](https://www.patreon.com/zloirock) if you are interested in `core-js`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<a href="https://opencollective.com/core-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/0/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/1/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/2/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/3/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/4/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/5/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/6/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/7/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/8/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/9/avatar.svg"></a>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<a href="https://opencollective.com/core-js#backers" target="_blank"><img src="https://opencollective.com/core-js/backers.svg?width=890"></a>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
**It's documentation for obsolete `core-js@2`. If you looking documentation for actual `core-js` version, please, check [this branch](https://github.com/zloirock/core-js/tree/master).**
|
|
5
23
|
|
|
6
24
|
Modular standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [promises](#ecmascript-6-promise), [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), iterators, [typed arrays](#ecmascript-6-typed-arrays), [ECMAScript 7+ proposals](#ecmascript-7-proposals), [setImmediate](#setimmediate), etc. Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only needed features or use it without global namespace pollution.
|
|
7
25
|
|
|
@@ -83,9 +101,9 @@ require('core-js/shim');
|
|
|
83
101
|
```
|
|
84
102
|
If you need complete build for browser, use builds from `core-js/client` path:
|
|
85
103
|
|
|
86
|
-
* [default](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
87
|
-
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
88
|
-
* [shim only](https://raw.githack.com/zloirock/core-js/v2.6.
|
|
104
|
+
* [default](https://raw.githack.com/zloirock/core-js/v2.6.8/client/core.min.js): Includes all features, standard and non-standard.
|
|
105
|
+
* [as a library](https://raw.githack.com/zloirock/core-js/v2.6.8/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.8/client/shim.min.js): Only includes the standard methods.
|
|
89
107
|
|
|
90
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.
|
|
91
109
|
|
|
@@ -235,11 +253,11 @@ core-js(/library)/es5
|
|
|
235
253
|
core-js(/library)/es6
|
|
236
254
|
```
|
|
237
255
|
#### ECMAScript 6: Object
|
|
238
|
-
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.8/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.to-string.js).
|
|
239
257
|
|
|
240
|
-
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.8/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.get-own-property-names.js).
|
|
241
259
|
|
|
242
|
-
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.8/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.object.es6.object.define-properties.js).
|
|
243
261
|
```js
|
|
244
262
|
Object
|
|
245
263
|
.assign(target, ...src) -> target
|
|
@@ -307,7 +325,7 @@ Object.keys('qwe'); // => ['0', '1', '2']
|
|
|
307
325
|
Object.getPrototypeOf('qwe') === String.prototype; // => true
|
|
308
326
|
```
|
|
309
327
|
#### ECMAScript 6: Function
|
|
310
|
-
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.8/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.function.bind.js).
|
|
311
329
|
```js
|
|
312
330
|
Function
|
|
313
331
|
#bind(object, ...args) -> boundFn(...args)
|
|
@@ -329,7 +347,7 @@ core-js/fn/function/virtual/bind
|
|
|
329
347
|
console.log.bind(console, 42)(43); // => 42 43
|
|
330
348
|
```
|
|
331
349
|
#### ECMAScript 6: Array
|
|
332
|
-
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.8/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.array.sort.js).
|
|
333
351
|
```js
|
|
334
352
|
Array
|
|
335
353
|
.from(iterable | array-like, mapFn(val, index)?, that) -> array
|
|
@@ -441,9 +459,9 @@ Array(5).fill(42); // => [42, 42, 42, 42, 42]
|
|
|
441
459
|
[1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5]
|
|
442
460
|
```
|
|
443
461
|
#### ECMAScript 6: String
|
|
444
|
-
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.8/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.trim.js).
|
|
445
463
|
|
|
446
|
-
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.8/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.string.sup.js).
|
|
447
465
|
```js
|
|
448
466
|
String
|
|
449
467
|
.fromCodePoint(...codePoints) -> str
|
|
@@ -542,9 +560,9 @@ String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t'
|
|
|
542
560
|
'baz'.link('http://example.com'); // => '<a href="http://example.com">baz</a>'
|
|
543
561
|
```
|
|
544
562
|
#### ECMAScript 6: RegExp
|
|
545
|
-
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.8/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.regexp.flags.js).
|
|
546
564
|
|
|
547
|
-
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.8/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.regexp.split.js).
|
|
548
566
|
```
|
|
549
567
|
[new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+)
|
|
550
568
|
#flags -> str (IE9+)
|
|
@@ -585,12 +603,12 @@ RegExp(/./g, 'm'); // => /./m
|
|
|
585
603
|
RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar'
|
|
586
604
|
```
|
|
587
605
|
#### ECMAScript 6: Number
|
|
588
|
-
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.8/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3):
|
|
589
607
|
```js
|
|
590
608
|
Number('0b1010101'); // => 85
|
|
591
609
|
Number('0o7654321'); // => 2054353
|
|
592
610
|
```
|
|
593
|
-
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.8/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.parse-float.js).
|
|
594
612
|
```js
|
|
595
613
|
[new] Number(var) -> number | number object
|
|
596
614
|
.isFinite(num) -> bool
|
|
@@ -626,7 +644,7 @@ core-js(/library)/fn/parse-float
|
|
|
626
644
|
core-js(/library)/fn/parse-int
|
|
627
645
|
```
|
|
628
646
|
#### ECMAScript 6: Math
|
|
629
|
-
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.8/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.math.trunc.js).
|
|
630
648
|
```js
|
|
631
649
|
Math
|
|
632
650
|
.acosh(num) -> num
|
|
@@ -669,7 +687,7 @@ core-js(/library)/fn/math/tanh
|
|
|
669
687
|
core-js(/library)/fn/math/trunc
|
|
670
688
|
```
|
|
671
689
|
#### ECMAScript 6: Date
|
|
672
|
-
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.8/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.date.to-primitive.js).
|
|
673
691
|
```js
|
|
674
692
|
Date
|
|
675
693
|
.now() -> int
|
|
@@ -693,7 +711,7 @@ new Date(NaN).toString(); // => 'Invalid Date'
|
|
|
693
711
|
```
|
|
694
712
|
|
|
695
713
|
#### ECMAScript 6: Promise
|
|
696
|
-
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.8/modules/es6.promise.js).
|
|
697
715
|
```js
|
|
698
716
|
new Promise(executor(resolve(var), reject(var))) -> promise
|
|
699
717
|
#then(resolved(var), rejected(var)) -> promise
|
|
@@ -813,7 +831,7 @@ setTimeout(() => p.catch(_ => _), 1e3);
|
|
|
813
831
|
```
|
|
814
832
|
|
|
815
833
|
#### ECMAScript 6: Symbol
|
|
816
|
-
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.8/modules/es6.symbol.js).
|
|
817
835
|
```js
|
|
818
836
|
Symbol(description?) -> symbol
|
|
819
837
|
.hasInstance -> @@hasInstance
|
|
@@ -925,7 +943,7 @@ for(var key in o2)console.log(key); // nothing
|
|
|
925
943
|
#### ECMAScript 6: Collections
|
|
926
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).
|
|
927
945
|
#### Map
|
|
928
|
-
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.8/modules/es6.map.js).
|
|
929
947
|
```js
|
|
930
948
|
new Map(iterable (entries) ?) -> map
|
|
931
949
|
#clear() -> void
|
|
@@ -979,7 +997,7 @@ for(var [key, val] of map.entries()){
|
|
|
979
997
|
}
|
|
980
998
|
```
|
|
981
999
|
#### Set
|
|
982
|
-
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.8/modules/es6.set.js).
|
|
983
1001
|
```js
|
|
984
1002
|
new Set(iterable?) -> set
|
|
985
1003
|
#add(key) -> @
|
|
@@ -1023,7 +1041,7 @@ for(var [key, val] of set.entries()){
|
|
|
1023
1041
|
}
|
|
1024
1042
|
```
|
|
1025
1043
|
#### WeakMap
|
|
1026
|
-
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.8/modules/es6.weak-map.js).
|
|
1027
1045
|
```js
|
|
1028
1046
|
new WeakMap(iterable (entries) ?) -> weakmap
|
|
1029
1047
|
#delete(key) -> bool
|
|
@@ -1067,7 +1085,7 @@ console.log(person.getName()); // => 'Vasya'
|
|
|
1067
1085
|
for(var key in person)console.log(key); // => only 'getName'
|
|
1068
1086
|
```
|
|
1069
1087
|
#### WeakSet
|
|
1070
|
-
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.8/modules/es6.weak-set.js).
|
|
1071
1089
|
```js
|
|
1072
1090
|
new WeakSet(iterable?) -> weakset
|
|
1073
1091
|
#add(key) -> @
|
|
@@ -1099,7 +1117,7 @@ console.log(wset.has(b)); // => false
|
|
|
1099
1117
|
#### ECMAScript 6: Typed Arrays
|
|
1100
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.
|
|
1101
1119
|
|
|
1102
|
-
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.8/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.typed.float64-array.js).
|
|
1103
1121
|
```js
|
|
1104
1122
|
new ArrayBuffer(length) -> buffer
|
|
1105
1123
|
.isView(var) -> bool
|
|
@@ -1232,7 +1250,7 @@ for(var [key, val] of typed.entries()){
|
|
|
1232
1250
|
* In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static.
|
|
1233
1251
|
|
|
1234
1252
|
#### ECMAScript 6: Reflect
|
|
1235
|
-
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.8/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es6.reflect.set-prototype-of.js).
|
|
1236
1254
|
```js
|
|
1237
1255
|
Reflect
|
|
1238
1256
|
.apply(target, thisArgument, argumentsList) -> var
|
|
@@ -1309,7 +1327,7 @@ core-js(/library)/es7/observable
|
|
|
1309
1327
|
```js
|
|
1310
1328
|
core-js(/library)/stage/4
|
|
1311
1329
|
```
|
|
1312
|
-
* `{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.8/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays).
|
|
1313
1331
|
```js
|
|
1314
1332
|
Array
|
|
1315
1333
|
#includes(var, from?) -> bool
|
|
@@ -1341,7 +1359,7 @@ core-js(/library)/fn/array/includes
|
|
|
1341
1359
|
Array(1).indexOf(undefined); // => -1
|
|
1342
1360
|
Array(1).includes(undefined); // => true
|
|
1343
1361
|
```
|
|
1344
|
-
* `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.8/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.object.entries.js)
|
|
1345
1363
|
```js
|
|
1346
1364
|
Object
|
|
1347
1365
|
.values(object) -> array
|
|
@@ -1362,7 +1380,7 @@ for(let [key, value] of Object.entries({a: 1, b: 2, c: 3})){
|
|
|
1362
1380
|
console.log(value); // => 1, 2, 3
|
|
1363
1381
|
}
|
|
1364
1382
|
```
|
|
1365
|
-
* `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.8/modules/es7.object.get-own-property-descriptors.js)
|
|
1366
1384
|
```js
|
|
1367
1385
|
Object
|
|
1368
1386
|
.getOwnPropertyDescriptors(object) -> object
|
|
@@ -1378,7 +1396,7 @@ var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescript
|
|
|
1378
1396
|
// Mixin:
|
|
1379
1397
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1380
1398
|
```
|
|
1381
|
-
* `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.8/modules/es7.string.pad-start.js), [`es7.string.pad-end`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.string.pad-end.js)
|
|
1382
1400
|
```js
|
|
1383
1401
|
String
|
|
1384
1402
|
#padStart(length, fillStr = ' ') -> string
|
|
@@ -1398,7 +1416,7 @@ core-js(/library)/fn/string/virtual/pad-end
|
|
|
1398
1416
|
'hello'.padEnd(10); // => 'hello '
|
|
1399
1417
|
'hello'.padEnd(10, '1234'); // => 'hello12341'
|
|
1400
1418
|
```
|
|
1401
|
-
* `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.8/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.object.lookup-getter.js).
|
|
1402
1420
|
```js
|
|
1403
1421
|
Object
|
|
1404
1422
|
#__defineSetter__(key, fn) -> void
|
|
@@ -1419,7 +1437,7 @@ core-js(/library)/fn/object/lookup-setter
|
|
|
1419
1437
|
```js
|
|
1420
1438
|
core-js(/library)/stage/3
|
|
1421
1439
|
```
|
|
1422
|
-
* `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.8/modules/es7.global.js) and [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.system.global.js) (obsolete)
|
|
1423
1441
|
```js
|
|
1424
1442
|
global -> object
|
|
1425
1443
|
System
|
|
@@ -1434,7 +1452,7 @@ core-js(/library)/fn/system/global (obsolete)
|
|
|
1434
1452
|
```js
|
|
1435
1453
|
global.Array === Array; // => true
|
|
1436
1454
|
```
|
|
1437
|
-
* `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.8/modules/es7.promise.finally.js)
|
|
1438
1456
|
```js
|
|
1439
1457
|
Promise
|
|
1440
1458
|
#finally(onFinally()) -> promise
|
|
@@ -1454,7 +1472,7 @@ Promise.reject(42).finally(() => console.log('You will see it anyway'));
|
|
|
1454
1472
|
```js
|
|
1455
1473
|
core-js(/library)/stage/2
|
|
1456
1474
|
```
|
|
1457
|
-
* `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.8/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.string.trim-right.js)
|
|
1458
1476
|
```js
|
|
1459
1477
|
String
|
|
1460
1478
|
#trimLeft() -> string
|
|
@@ -1479,7 +1497,7 @@ core-js(/library)/fn/string/virtual/trim-right
|
|
|
1479
1497
|
' hello '.trimRight(); // => ' hello'
|
|
1480
1498
|
```
|
|
1481
1499
|
```
|
|
1482
|
-
* `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.8/modules/es7.symbol.async-iterator.js)
|
|
1483
1501
|
```js
|
|
1484
1502
|
Symbol
|
|
1485
1503
|
.asyncIterator -> @@asyncIterator
|
|
@@ -1494,7 +1512,7 @@ core-js(/library)/fn/symbol/async-iterator
|
|
|
1494
1512
|
```js
|
|
1495
1513
|
core-js(/library)/stage/1
|
|
1496
1514
|
```
|
|
1497
|
-
* `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.8/modules/es7.promise.try.js)
|
|
1498
1516
|
```js
|
|
1499
1517
|
Promise
|
|
1500
1518
|
.try(function()) -> promise
|
|
@@ -1509,7 +1527,7 @@ Promise.try(() => 42).then(it => console.log(`Promise, resolved as ${it}`));
|
|
|
1509
1527
|
|
|
1510
1528
|
Promise.try(() => { throw 42; }).catch(it => console.log(`Promise, rejected as ${it}`));
|
|
1511
1529
|
```
|
|
1512
|
-
* `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.8/modules/es7.array.flatten.js) and [`es7.array.flat-map`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.array.flat-map.js)
|
|
1513
1531
|
```js
|
|
1514
1532
|
Array
|
|
1515
1533
|
#flatten(depthArg = 1) -> array
|
|
@@ -1530,7 +1548,7 @@ core-js(/library)/fn/array/virtual/flat-map
|
|
|
1530
1548
|
|
|
1531
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]
|
|
1532
1550
|
```
|
|
1533
|
-
* `.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.8/modules/es7.set.of.js), [`es7.set.from`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.set.from.js), [`es7.map.of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.map.of.js), [`es7.map.from`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.map.from.js), [`es7.weak-set.of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.weak-set.of.js), [`es7.weak-set.from`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.weak-set.from.js), [`es7.weak-map.of`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.weak-map.of.js), [`es7.weak-map.from`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.weak-map.from.js)
|
|
1534
1552
|
```js
|
|
1535
1553
|
Set
|
|
1536
1554
|
.of(...args) -> set
|
|
@@ -1562,7 +1580,7 @@ Set.of(1, 2, 3, 2, 1); // => Set {1, 2, 3}
|
|
|
1562
1580
|
|
|
1563
1581
|
Map.from([[1, 2], [3, 4]], ([key, val]) => [key ** 2, val ** 2]); // => Map {1: 4, 9: 16}
|
|
1564
1582
|
```
|
|
1565
|
-
* `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.8/modules/es7.string.match-all.js)
|
|
1566
1584
|
```js
|
|
1567
1585
|
String
|
|
1568
1586
|
#matchAll(regexp) -> iterator
|
|
@@ -1578,7 +1596,7 @@ for(let [_, d, D] of '1111a2b3cccc'.matchAll(/(\d)(\D)/)){
|
|
|
1578
1596
|
console.log(d, D); // => 1 a, 2 b, 3 c
|
|
1579
1597
|
}
|
|
1580
1598
|
```
|
|
1581
|
-
* `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.8/modules/es7.observable.js) and [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.symbol.observable.js)
|
|
1582
1600
|
```js
|
|
1583
1601
|
new Observable(fn) -> observable
|
|
1584
1602
|
#subscribe(observer) -> subscription
|
|
@@ -1606,13 +1624,13 @@ new Observable(observer => {
|
|
|
1606
1624
|
```
|
|
1607
1625
|
* `Math.{clamp, DEG_PER_RAD, degrees, fscale, rad-per-deg, radians, scale}`
|
|
1608
1626
|
[proposal](https://github.com/rwaldron/proposal-math-extensions) - modules
|
|
1609
|
-
[`es7.math.clamp`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1610
|
-
[`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1611
|
-
[`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1612
|
-
[`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1613
|
-
[`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1614
|
-
[`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.6.
|
|
1615
|
-
[`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.8/modules/es7.math.clamp.js),
|
|
1628
|
+
[`es7.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.DEG_PER_RAD.js),
|
|
1629
|
+
[`es7.math.degrees`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.degrees.js),
|
|
1630
|
+
[`es7.math.fscale`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.fscale.js),
|
|
1631
|
+
[`es7.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.RAD_PER_DEG.js),
|
|
1632
|
+
[`es7.math.radians`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.radians.js) and
|
|
1633
|
+
[`es7.math.scale`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.scale.js)
|
|
1616
1634
|
```js
|
|
1617
1635
|
Math
|
|
1618
1636
|
.DEG_PER_RAD -> number
|
|
@@ -1633,7 +1651,7 @@ core-js(/library)/fn/math/rad-per-deg
|
|
|
1633
1651
|
core-js(/library)/fn/math/radians
|
|
1634
1652
|
core-js(/library)/fn/math/scale
|
|
1635
1653
|
```
|
|
1636
|
-
* `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.8/modules/es7.math.signbit.js)
|
|
1637
1655
|
```js
|
|
1638
1656
|
Math
|
|
1639
1657
|
.signbit(x) -> bool
|
|
@@ -1656,7 +1674,7 @@ Math.signbit(-0); // => false
|
|
|
1656
1674
|
```js
|
|
1657
1675
|
core-js(/library)/stage/0
|
|
1658
1676
|
```
|
|
1659
|
-
* `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.8/modules/es7.string.at.js)
|
|
1660
1678
|
```js
|
|
1661
1679
|
String
|
|
1662
1680
|
#at(index) -> string
|
|
@@ -1671,7 +1689,7 @@ core-js(/library)/fn/string/virtual/at
|
|
|
1671
1689
|
'a𠮷b'.at(1); // => '𠮷'
|
|
1672
1690
|
'a𠮷b'.at(1).length; // => 2
|
|
1673
1691
|
```
|
|
1674
|
-
* `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.8/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`)
|
|
1675
1693
|
```js
|
|
1676
1694
|
Map
|
|
1677
1695
|
#toJSON() -> array (rejected and will be removed from core-js@3)
|
|
@@ -1683,7 +1701,7 @@ Set
|
|
|
1683
1701
|
core-js(/library)/fn/map
|
|
1684
1702
|
core-js(/library)/fn/set
|
|
1685
1703
|
```
|
|
1686
|
-
* `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.8/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`)
|
|
1687
1705
|
```js
|
|
1688
1706
|
Error
|
|
1689
1707
|
.isError(it) -> bool (withdrawn and will be removed from core-js@3)
|
|
@@ -1692,7 +1710,7 @@ Error
|
|
|
1692
1710
|
```js
|
|
1693
1711
|
core-js(/library)/fn/error/is-error
|
|
1694
1712
|
```
|
|
1695
|
-
* `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.8/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.math.umulh.js)
|
|
1696
1714
|
```js
|
|
1697
1715
|
Math
|
|
1698
1716
|
.iaddh(lo0, hi0, lo1, hi1) -> int32
|
|
@@ -1707,7 +1725,7 @@ core-js(/library)/fn/math/isubh
|
|
|
1707
1725
|
core-js(/library)/fn/math/imulh
|
|
1708
1726
|
core-js(/library)/fn/math/umulh
|
|
1709
1727
|
```
|
|
1710
|
-
* `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.8/modules/es7.asap.js)
|
|
1711
1729
|
```js
|
|
1712
1730
|
asap(fn) -> void
|
|
1713
1731
|
```
|
|
@@ -1725,7 +1743,7 @@ asap(() => console.log('called as microtask'));
|
|
|
1725
1743
|
```js
|
|
1726
1744
|
core-js(/library)/stage/pre
|
|
1727
1745
|
```
|
|
1728
|
-
* `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.8/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/es7.reflect.metadata.js).
|
|
1729
1747
|
```js
|
|
1730
1748
|
Reflect
|
|
1731
1749
|
.defineMetadata(metadataKey, metadataValue, target, propertyKey?) -> void
|
|
@@ -1765,7 +1783,7 @@ Reflect.getOwnMetadata('foo', O); // => 'bar'
|
|
|
1765
1783
|
core-js(/library)/web
|
|
1766
1784
|
```
|
|
1767
1785
|
#### setTimeout / setInterval
|
|
1768
|
-
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.8/modules/web.timers.js). Additional arguments fix for IE9-.
|
|
1769
1787
|
```js
|
|
1770
1788
|
setTimeout(fn(...args), time, ...args) -> id
|
|
1771
1789
|
setInterval(fn(...args), time, ...args) -> id
|
|
@@ -1783,7 +1801,7 @@ setTimeout(log.bind(null, 42), 1000);
|
|
|
1783
1801
|
setTimeout(log, 1000, 42);
|
|
1784
1802
|
```
|
|
1785
1803
|
#### setImmediate
|
|
1786
|
-
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.8/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill.
|
|
1787
1805
|
```js
|
|
1788
1806
|
setImmediate(fn(...args), ...args) -> id
|
|
1789
1807
|
clearImmediate(id) -> void
|
|
@@ -1805,7 +1823,7 @@ clearImmediate(setImmediate(function(){
|
|
|
1805
1823
|
}));
|
|
1806
1824
|
```
|
|
1807
1825
|
#### Iterable DOM collections
|
|
1808
|
-
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.8/modules/web.dom.iterable.js):
|
|
1809
1827
|
```js
|
|
1810
1828
|
{
|
|
1811
1829
|
CSSRuleList,
|
|
@@ -1871,7 +1889,7 @@ for(var [index, {id}] of document.querySelectorAll('*').entries()){
|
|
|
1871
1889
|
core-js(/library)/core
|
|
1872
1890
|
```
|
|
1873
1891
|
#### Object
|
|
1874
|
-
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.8/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.object.make.js).
|
|
1875
1893
|
```js
|
|
1876
1894
|
Object
|
|
1877
1895
|
.isObject(var) -> bool
|
|
@@ -1984,7 +2002,7 @@ console.log(vector.xy); // => 15.811388300841896
|
|
|
1984
2002
|
console.log(vector.xyz); // => 25.495097567963924
|
|
1985
2003
|
```
|
|
1986
2004
|
#### Dict
|
|
1987
|
-
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.8/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).
|
|
1988
2006
|
```js
|
|
1989
2007
|
[new] Dict(iterable (entries) | object ?) -> dict
|
|
1990
2008
|
.isDict(var) -> bool
|
|
@@ -2137,7 +2155,7 @@ Dict.reduce(dict, function(memo, it){
|
|
|
2137
2155
|
}, ''); // => '123'
|
|
2138
2156
|
```
|
|
2139
2157
|
#### Partial application
|
|
2140
|
-
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.8/modules/core.function.part.js).
|
|
2141
2159
|
```js
|
|
2142
2160
|
Function
|
|
2143
2161
|
#part(...args | _) -> fn(...args)
|
|
@@ -2167,7 +2185,7 @@ fn2(1, 3, 5); // => 1, 2, 3, 4, 5
|
|
|
2167
2185
|
fn2(1); // => 1, 2, undefined, 4
|
|
2168
2186
|
```
|
|
2169
2187
|
#### Number Iterator
|
|
2170
|
-
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.8/modules/core.number.iterator.js).
|
|
2171
2189
|
```js
|
|
2172
2190
|
Number
|
|
2173
2191
|
#@@iterator() -> iterator
|
|
@@ -2192,7 +2210,7 @@ Array.from(10, function(it){
|
|
|
2192
2210
|
}, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42]
|
|
2193
2211
|
```
|
|
2194
2212
|
#### Escaping strings
|
|
2195
|
-
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.8/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.string.unescape-html.js).
|
|
2196
2214
|
```js
|
|
2197
2215
|
RegExp
|
|
2198
2216
|
.escape(str) -> str
|
|
@@ -2218,7 +2236,7 @@ RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^
|
|
|
2218
2236
|
'<script>doSomething();</script>'.unescapeHTML(); // => '<script>doSomething();</script>'
|
|
2219
2237
|
```
|
|
2220
2238
|
#### delay
|
|
2221
|
-
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.8/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function).
|
|
2222
2240
|
```js
|
|
2223
2241
|
delay(ms) -> promise
|
|
2224
2242
|
```
|
|
@@ -2239,7 +2257,7 @@ delay(1e3).then(() => console.log('after 1 sec'));
|
|
|
2239
2257
|
})();
|
|
2240
2258
|
```
|
|
2241
2259
|
#### Helpers for iterators
|
|
2242
|
-
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.8/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.6.8/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object:
|
|
2243
2261
|
```js
|
|
2244
2262
|
core
|
|
2245
2263
|
.isIterable(var) -> bool
|