core-js 2.2.1 → 2.4.1
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 +30 -0
- package/bower.json +1 -1
- package/build/config.js +13 -3
- package/client/core.js +1980 -1641
- package/client/core.min.js +4 -4
- package/client/core.min.js.map +1 -1
- package/client/library.js +1877 -1547
- package/client/library.min.js +4 -4
- package/client/library.min.js.map +1 -1
- package/client/shim.js +1907 -1582
- 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 +4 -0
- package/es7/observable.js +7 -0
- package/es7/symbol.js +3 -0
- package/fn/asap.js +2 -0
- package/fn/date/to-string.js +2 -2
- package/fn/observable.js +7 -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 +4 -0
- package/library/es7/observable.js +7 -0
- package/library/es7/symbol.js +3 -0
- package/library/fn/asap.js +2 -0
- package/library/fn/date/to-string.js +2 -2
- package/library/fn/observable.js +7 -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/_a-number-value.js +4 -4
- package/library/modules/_array-includes.js +1 -1
- package/library/modules/_array-reduce.js +27 -27
- package/library/modules/_array-species-constructor.js +16 -0
- package/library/modules/_array-species-create.js +3 -13
- package/library/modules/_collection-strong.js +0 -1
- package/library/modules/_core.js +1 -1
- package/library/modules/_create-property.js +8 -0
- package/library/modules/_date-to-primitive.js +8 -8
- package/library/modules/_enum-bug-keys.js +3 -3
- package/library/modules/_for-of.js +12 -6
- package/library/modules/_ie8-dom-define.js +2 -2
- package/library/modules/_inherit-if-required.js +7 -7
- package/library/modules/_iter-detect.js +1 -1
- package/library/modules/_math-expm1.js +8 -2
- package/library/modules/_microtask.js +58 -48
- package/library/modules/_object-create.js +41 -40
- package/library/modules/_object-dps.js +12 -12
- package/library/modules/_object-forced-pam.js +6 -6
- package/library/modules/_object-gopd.js +15 -15
- package/library/modules/_object-gopn.js +6 -6
- package/library/modules/_object-gpo.js +12 -12
- package/library/modules/_object-keys-internal.js +16 -16
- package/library/modules/_object-keys.js +6 -6
- package/library/modules/_shared-key.js +4 -4
- package/library/modules/_strict-method.js +6 -6
- package/library/modules/_string-pad.js +1 -2
- package/library/modules/_string-ws.js +1 -1
- package/library/modules/_typed-array.js +0 -2
- package/library/modules/_typed-buffer.js +0 -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.every.js +9 -9
- package/library/modules/es6.array.filter.js +9 -9
- package/library/modules/es6.array.for-each.js +10 -10
- package/library/modules/es6.array.from.js +11 -9
- package/library/modules/es6.array.index-of.js +14 -9
- package/library/modules/es6.array.is-array.js +3 -3
- package/library/modules/es6.array.join.js +11 -11
- package/library/modules/es6.array.last-index-of.js +21 -17
- package/library/modules/es6.array.map.js +9 -9
- package/library/modules/es6.array.of.js +3 -2
- package/library/modules/es6.array.reduce-right.js +9 -9
- package/library/modules/es6.array.reduce.js +9 -9
- package/library/modules/es6.array.slice.js +27 -27
- package/library/modules/es6.array.some.js +9 -9
- package/library/modules/es6.array.sort.js +22 -22
- package/library/modules/es6.date.now.js +3 -3
- package/library/modules/es6.date.to-iso-string.js +27 -27
- package/library/modules/es6.function.bind.js +3 -3
- package/library/modules/es6.math.acosh.js +6 -2
- package/library/modules/es6.math.asinh.js +4 -2
- package/library/modules/es6.math.atanh.js +4 -2
- package/library/modules/es6.math.expm1.js +3 -2
- package/library/modules/es6.number.to-fixed.js +112 -113
- package/library/modules/es6.number.to-precision.js +17 -17
- package/library/modules/es6.object.create.js +2 -2
- package/library/modules/es6.object.define-properties.js +2 -2
- package/library/modules/es6.object.define-property.js +2 -2
- package/library/modules/es6.parse-float.js +3 -3
- package/library/modules/es6.parse-int.js +3 -3
- package/library/modules/es6.promise.js +1 -3
- package/library/modules/es6.reflect.apply.js +12 -5
- package/library/modules/es6.reflect.construct.js +20 -11
- package/library/modules/es6.symbol.js +59 -59
- package/library/modules/es6.typed.array-buffer.js +0 -1
- package/library/modules/es6.weak-map.js +0 -1
- package/library/modules/es7.asap.js +12 -0
- package/library/modules/es7.object.define-getter.js +11 -11
- package/library/modules/es7.object.define-setter.js +11 -11
- package/library/modules/es7.object.enumerable-entries.js +12 -0
- package/library/modules/es7.object.enumerable-keys.js +12 -0
- package/library/modules/es7.object.enumerable-values.js +12 -0
- package/library/modules/es7.object.get-own-property-descriptors.js +8 -12
- package/library/modules/es7.object.lookup-getter.js +17 -17
- package/library/modules/es7.object.lookup-setter.js +17 -17
- package/library/modules/es7.observable.js +199 -0
- package/library/modules/es7.string.match-all.js +29 -29
- package/library/modules/es7.symbol.async-iterator.js +1 -0
- package/library/modules/es7.symbol.observable.js +1 -0
- package/library/shim.js +4 -0
- package/library/stage/0.js +1 -0
- package/library/stage/1.js +3 -2
- package/library/stage/2.js +3 -1
- package/library/stage/3.js +1 -3
- package/library/stage/4.js +3 -1
- package/library/stage/pre.js +9 -9
- package/modules/_a-number-value.js +4 -4
- package/modules/_array-includes.js +1 -1
- package/modules/_array-reduce.js +27 -27
- package/modules/_array-species-constructor.js +16 -0
- package/modules/_array-species-create.js +3 -13
- package/modules/_collection-strong.js +0 -1
- package/modules/_core.js +1 -1
- package/modules/_create-property.js +8 -0
- package/modules/_date-to-primitive.js +8 -8
- package/modules/_enum-bug-keys.js +3 -3
- package/modules/_for-of.js +12 -6
- package/modules/_ie8-dom-define.js +2 -2
- package/modules/_inherit-if-required.js +7 -7
- package/modules/_iter-detect.js +1 -1
- package/modules/_math-expm1.js +8 -2
- package/modules/_microtask.js +58 -48
- package/modules/_object-create.js +41 -40
- package/modules/_object-dps.js +12 -12
- package/modules/_object-forced-pam.js +6 -6
- package/modules/_object-gopd.js +15 -15
- package/modules/_object-gopn.js +6 -6
- package/modules/_object-gpo.js +12 -12
- package/modules/_object-keys-internal.js +16 -16
- package/modules/_object-keys.js +6 -6
- package/modules/_shared-key.js +4 -4
- package/modules/_strict-method.js +6 -6
- package/modules/_string-pad.js +1 -2
- package/modules/_string-ws.js +1 -1
- package/modules/_typed-array.js +0 -2
- package/modules/_typed-buffer.js +0 -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.every.js +9 -9
- package/modules/es6.array.filter.js +9 -9
- package/modules/es6.array.for-each.js +10 -10
- package/modules/es6.array.from.js +11 -9
- package/modules/es6.array.index-of.js +14 -9
- package/modules/es6.array.is-array.js +3 -3
- package/modules/es6.array.join.js +11 -11
- package/modules/es6.array.last-index-of.js +21 -17
- package/modules/es6.array.map.js +9 -9
- package/modules/es6.array.of.js +3 -2
- package/modules/es6.array.reduce-right.js +9 -9
- package/modules/es6.array.reduce.js +9 -9
- package/modules/es6.array.slice.js +27 -27
- package/modules/es6.array.some.js +9 -9
- package/modules/es6.array.sort.js +22 -22
- package/modules/es6.date.now.js +3 -3
- package/modules/es6.date.to-iso-string.js +27 -27
- package/modules/es6.date.to-primitive.js +3 -3
- package/modules/es6.function.bind.js +3 -3
- package/modules/es6.function.name.js +13 -4
- package/modules/es6.math.acosh.js +6 -2
- package/modules/es6.math.asinh.js +4 -2
- package/modules/es6.math.atanh.js +4 -2
- package/modules/es6.math.expm1.js +3 -2
- package/modules/es6.number.to-fixed.js +112 -113
- package/modules/es6.number.to-precision.js +17 -17
- package/modules/es6.object.create.js +2 -2
- package/modules/es6.object.define-properties.js +2 -2
- package/modules/es6.object.define-property.js +2 -2
- package/modules/es6.parse-float.js +3 -3
- package/modules/es6.parse-int.js +3 -3
- package/modules/es6.promise.js +1 -3
- package/modules/es6.reflect.apply.js +12 -5
- package/modules/es6.reflect.construct.js +20 -11
- package/modules/es6.regexp.to-string.js +24 -24
- package/modules/es6.symbol.js +59 -59
- package/modules/es6.typed.array-buffer.js +0 -1
- package/modules/es6.weak-map.js +0 -1
- package/modules/es7.asap.js +12 -0
- package/modules/es7.object.define-getter.js +11 -11
- package/modules/es7.object.define-setter.js +11 -11
- package/modules/es7.object.enumerable-entries.js +12 -0
- package/modules/es7.object.enumerable-keys.js +12 -0
- package/modules/es7.object.enumerable-values.js +12 -0
- package/modules/es7.object.get-own-property-descriptors.js +8 -12
- package/modules/es7.object.lookup-getter.js +17 -17
- package/modules/es7.object.lookup-setter.js +17 -17
- package/modules/es7.observable.js +199 -0
- package/modules/es7.string.match-all.js +29 -29
- package/modules/es7.symbol.async-iterator.js +1 -0
- package/modules/es7.symbol.observable.js +1 -0
- package/package.json +15 -13
- package/shim.js +4 -0
- package/stage/0.js +1 -0
- package/stage/1.js +3 -2
- package/stage/2.js +3 -1
- package/stage/3.js +1 -3
- package/stage/4.js +3 -1
- package/stage/pre.js +9 -9
- package/README.md +0 -1981
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
, $reduce = require('./_array-reduce');
|
|
4
|
-
|
|
5
|
-
$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
|
|
6
|
-
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
|
|
7
|
-
reduce: function reduce(callbackfn /* , initialValue */){
|
|
8
|
-
return $reduce(this, callbackfn, arguments.length, arguments[1], false);
|
|
9
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $reduce = require('./_array-reduce');
|
|
4
|
+
|
|
5
|
+
$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
|
|
6
|
+
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
|
|
7
|
+
reduce: function reduce(callbackfn /* , initialValue */){
|
|
8
|
+
return $reduce(this, callbackfn, arguments.length, arguments[1], false);
|
|
9
|
+
}
|
|
10
10
|
});
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
, html = require('./_html')
|
|
4
|
-
, cof = require('./_cof')
|
|
5
|
-
, toIndex = require('./_to-index')
|
|
6
|
-
, toLength = require('./_to-length')
|
|
7
|
-
, arraySlice = [].slice;
|
|
8
|
-
|
|
9
|
-
// fallback for not array-like ES3 strings and DOM objects
|
|
10
|
-
$export($export.P + $export.F * require('./_fails')(function(){
|
|
11
|
-
if(html)arraySlice.call(html);
|
|
12
|
-
}), 'Array', {
|
|
13
|
-
slice: function slice(begin, end){
|
|
14
|
-
var len = toLength(this.length)
|
|
15
|
-
, klass = cof(this);
|
|
16
|
-
end = end === undefined ? len : end;
|
|
17
|
-
if(klass == 'Array')return arraySlice.call(this, begin, end);
|
|
18
|
-
var start = toIndex(begin, len)
|
|
19
|
-
, upTo = toIndex(end, len)
|
|
20
|
-
, size = toLength(upTo - start)
|
|
21
|
-
, cloned = Array(size)
|
|
22
|
-
, i = 0;
|
|
23
|
-
for(; i < size; i++)cloned[i] = klass == 'String'
|
|
24
|
-
? this.charAt(start + i)
|
|
25
|
-
: this[start + i];
|
|
26
|
-
return cloned;
|
|
27
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, html = require('./_html')
|
|
4
|
+
, cof = require('./_cof')
|
|
5
|
+
, toIndex = require('./_to-index')
|
|
6
|
+
, toLength = require('./_to-length')
|
|
7
|
+
, arraySlice = [].slice;
|
|
8
|
+
|
|
9
|
+
// fallback for not array-like ES3 strings and DOM objects
|
|
10
|
+
$export($export.P + $export.F * require('./_fails')(function(){
|
|
11
|
+
if(html)arraySlice.call(html);
|
|
12
|
+
}), 'Array', {
|
|
13
|
+
slice: function slice(begin, end){
|
|
14
|
+
var len = toLength(this.length)
|
|
15
|
+
, klass = cof(this);
|
|
16
|
+
end = end === undefined ? len : end;
|
|
17
|
+
if(klass == 'Array')return arraySlice.call(this, begin, end);
|
|
18
|
+
var start = toIndex(begin, len)
|
|
19
|
+
, upTo = toIndex(end, len)
|
|
20
|
+
, size = toLength(upTo - start)
|
|
21
|
+
, cloned = Array(size)
|
|
22
|
+
, i = 0;
|
|
23
|
+
for(; i < size; i++)cloned[i] = klass == 'String'
|
|
24
|
+
? this.charAt(start + i)
|
|
25
|
+
: this[start + i];
|
|
26
|
+
return cloned;
|
|
27
|
+
}
|
|
28
28
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
, $some = require('./_array-methods')(3);
|
|
4
|
-
|
|
5
|
-
$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
|
|
6
|
-
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
|
|
7
|
-
some: function some(callbackfn /* , thisArg */){
|
|
8
|
-
return $some(this, callbackfn, arguments[1]);
|
|
9
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $some = require('./_array-methods')(3);
|
|
4
|
+
|
|
5
|
+
$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
|
|
6
|
+
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
|
|
7
|
+
some: function some(callbackfn /* , thisArg */){
|
|
8
|
+
return $some(this, callbackfn, arguments[1]);
|
|
9
|
+
}
|
|
10
10
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
, aFunction = require('./_a-function')
|
|
4
|
-
, toObject = require('./_to-object')
|
|
5
|
-
, fails = require('./_fails')
|
|
6
|
-
, $sort = [].sort
|
|
7
|
-
, test = [1, 2, 3];
|
|
8
|
-
|
|
9
|
-
$export($export.P + $export.F * (fails(function(){
|
|
10
|
-
// IE8-
|
|
11
|
-
test.sort(undefined);
|
|
12
|
-
}) || !fails(function(){
|
|
13
|
-
// V8 bug
|
|
14
|
-
test.sort(null);
|
|
15
|
-
// Old WebKit
|
|
16
|
-
}) || !require('./_strict-method')($sort)), 'Array', {
|
|
17
|
-
// 22.1.3.25 Array.prototype.sort(comparefn)
|
|
18
|
-
sort: function sort(comparefn){
|
|
19
|
-
return comparefn === undefined
|
|
20
|
-
? $sort.call(toObject(this))
|
|
21
|
-
: $sort.call(toObject(this), aFunction(comparefn));
|
|
22
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, aFunction = require('./_a-function')
|
|
4
|
+
, toObject = require('./_to-object')
|
|
5
|
+
, fails = require('./_fails')
|
|
6
|
+
, $sort = [].sort
|
|
7
|
+
, test = [1, 2, 3];
|
|
8
|
+
|
|
9
|
+
$export($export.P + $export.F * (fails(function(){
|
|
10
|
+
// IE8-
|
|
11
|
+
test.sort(undefined);
|
|
12
|
+
}) || !fails(function(){
|
|
13
|
+
// V8 bug
|
|
14
|
+
test.sort(null);
|
|
15
|
+
// Old WebKit
|
|
16
|
+
}) || !require('./_strict-method')($sort)), 'Array', {
|
|
17
|
+
// 22.1.3.25 Array.prototype.sort(comparefn)
|
|
18
|
+
sort: function sort(comparefn){
|
|
19
|
+
return comparefn === undefined
|
|
20
|
+
? $sort.call(toObject(this))
|
|
21
|
+
: $sort.call(toObject(this), aFunction(comparefn));
|
|
22
|
+
}
|
|
23
23
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// 20.3.3.1 / 15.9.4.4 Date.now()
|
|
2
|
-
var $export = require('./_export');
|
|
3
|
-
|
|
1
|
+
// 20.3.3.1 / 15.9.4.4 Date.now()
|
|
2
|
+
var $export = require('./_export');
|
|
3
|
+
|
|
4
4
|
$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
|
|
3
|
-
var $export = require('./_export')
|
|
4
|
-
, fails = require('./_fails')
|
|
5
|
-
, getTime = Date.prototype.getTime;
|
|
6
|
-
|
|
7
|
-
var lz = function(num){
|
|
8
|
-
return num > 9 ? num : '0' + num;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// PhantomJS / old WebKit has a broken implementations
|
|
12
|
-
$export($export.P + $export.F * (fails(function(){
|
|
13
|
-
return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
|
|
14
|
-
}) || !fails(function(){
|
|
15
|
-
new Date(NaN).toISOString();
|
|
16
|
-
})), 'Date', {
|
|
17
|
-
toISOString: function toISOString(){
|
|
18
|
-
if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
|
|
19
|
-
var d = this
|
|
20
|
-
, y = d.getUTCFullYear()
|
|
21
|
-
, m = d.getUTCMilliseconds()
|
|
22
|
-
, s = y < 0 ? '-' : y > 9999 ? '+' : '';
|
|
23
|
-
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
|
|
24
|
-
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
|
|
25
|
-
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
|
|
26
|
-
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
|
|
27
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
|
|
3
|
+
var $export = require('./_export')
|
|
4
|
+
, fails = require('./_fails')
|
|
5
|
+
, getTime = Date.prototype.getTime;
|
|
6
|
+
|
|
7
|
+
var lz = function(num){
|
|
8
|
+
return num > 9 ? num : '0' + num;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// PhantomJS / old WebKit has a broken implementations
|
|
12
|
+
$export($export.P + $export.F * (fails(function(){
|
|
13
|
+
return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
|
|
14
|
+
}) || !fails(function(){
|
|
15
|
+
new Date(NaN).toISOString();
|
|
16
|
+
})), 'Date', {
|
|
17
|
+
toISOString: function toISOString(){
|
|
18
|
+
if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
|
|
19
|
+
var d = this
|
|
20
|
+
, y = d.getUTCFullYear()
|
|
21
|
+
, m = d.getUTCMilliseconds()
|
|
22
|
+
, s = y < 0 ? '-' : y > 9999 ? '+' : '';
|
|
23
|
+
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
|
|
24
|
+
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
|
|
25
|
+
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
|
|
26
|
+
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
|
|
27
|
+
}
|
|
28
28
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
|
|
2
|
-
var $export = require('./_export');
|
|
3
|
-
|
|
1
|
+
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
|
|
2
|
+
var $export = require('./_export');
|
|
3
|
+
|
|
4
4
|
$export($export.P, 'Function', {bind: require('./_bind')});
|
|
@@ -4,8 +4,12 @@ var $export = require('./_export')
|
|
|
4
4
|
, sqrt = Math.sqrt
|
|
5
5
|
, $acosh = Math.acosh;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
$export($export.S + $export.F * !($acosh
|
|
8
|
+
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
|
|
9
|
+
&& Math.floor($acosh(Number.MAX_VALUE)) == 710
|
|
10
|
+
// Tor Browser bug: Math.acosh(Infinity) -> NaN
|
|
11
|
+
&& $acosh(Infinity) == Infinity
|
|
12
|
+
), 'Math', {
|
|
9
13
|
acosh: function acosh(x){
|
|
10
14
|
return (x = +x) < 1 ? NaN : x > 94906265.62425156
|
|
11
15
|
? Math.log(x) + Math.LN2
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// 20.2.2.5 Math.asinh(x)
|
|
2
|
-
var $export = require('./_export')
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $asinh = Math.asinh;
|
|
3
4
|
|
|
4
5
|
function asinh(x){
|
|
5
6
|
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
// Tor Browser bug: Math.asinh(0) -> -0
|
|
10
|
+
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// 20.2.2.7 Math.atanh(x)
|
|
2
|
-
var $export = require('./_export')
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $atanh = Math.atanh;
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// Tor Browser bug: Math.atanh(-0) -> 0
|
|
6
|
+
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
|
|
5
7
|
atanh: function atanh(x){
|
|
6
8
|
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
|
|
7
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// 20.2.2.14 Math.expm1(x)
|
|
2
|
-
var $export = require('./_export')
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $expm1 = require('./_math-expm1');
|
|
3
4
|
|
|
4
|
-
$export($export.S, 'Math', {expm1:
|
|
5
|
+
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});
|
|
@@ -1,114 +1,113 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
,
|
|
4
|
-
,
|
|
5
|
-
,
|
|
6
|
-
,
|
|
7
|
-
,
|
|
8
|
-
,
|
|
9
|
-
,
|
|
10
|
-
,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
0.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
,
|
|
69
|
-
,
|
|
70
|
-
,
|
|
71
|
-
|
|
72
|
-
if(
|
|
73
|
-
if(x
|
|
74
|
-
if(x
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
z
|
|
82
|
-
|
|
83
|
-
e
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
j
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
j
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
multiply(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, toInteger = require('./_to-integer')
|
|
4
|
+
, aNumberValue = require('./_a-number-value')
|
|
5
|
+
, repeat = require('./_string-repeat')
|
|
6
|
+
, $toFixed = 1..toFixed
|
|
7
|
+
, floor = Math.floor
|
|
8
|
+
, data = [0, 0, 0, 0, 0, 0]
|
|
9
|
+
, ERROR = 'Number.toFixed: incorrect invocation!'
|
|
10
|
+
, ZERO = '0';
|
|
11
|
+
|
|
12
|
+
var multiply = function(n, c){
|
|
13
|
+
var i = -1
|
|
14
|
+
, c2 = c;
|
|
15
|
+
while(++i < 6){
|
|
16
|
+
c2 += n * data[i];
|
|
17
|
+
data[i] = c2 % 1e7;
|
|
18
|
+
c2 = floor(c2 / 1e7);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var divide = function(n){
|
|
22
|
+
var i = 6
|
|
23
|
+
, c = 0;
|
|
24
|
+
while(--i >= 0){
|
|
25
|
+
c += data[i];
|
|
26
|
+
data[i] = floor(c / n);
|
|
27
|
+
c = (c % n) * 1e7;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var numToString = function(){
|
|
31
|
+
var i = 6
|
|
32
|
+
, s = '';
|
|
33
|
+
while(--i >= 0){
|
|
34
|
+
if(s !== '' || i === 0 || data[i] !== 0){
|
|
35
|
+
var t = String(data[i]);
|
|
36
|
+
s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
|
|
37
|
+
}
|
|
38
|
+
} return s;
|
|
39
|
+
};
|
|
40
|
+
var pow = function(x, n, acc){
|
|
41
|
+
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
|
|
42
|
+
};
|
|
43
|
+
var log = function(x){
|
|
44
|
+
var n = 0
|
|
45
|
+
, x2 = x;
|
|
46
|
+
while(x2 >= 4096){
|
|
47
|
+
n += 12;
|
|
48
|
+
x2 /= 4096;
|
|
49
|
+
}
|
|
50
|
+
while(x2 >= 2){
|
|
51
|
+
n += 1;
|
|
52
|
+
x2 /= 2;
|
|
53
|
+
} return n;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
$export($export.P + $export.F * (!!$toFixed && (
|
|
57
|
+
0.00008.toFixed(3) !== '0.000' ||
|
|
58
|
+
0.9.toFixed(0) !== '1' ||
|
|
59
|
+
1.255.toFixed(2) !== '1.25' ||
|
|
60
|
+
1000000000000000128..toFixed(0) !== '1000000000000000128'
|
|
61
|
+
) || !require('./_fails')(function(){
|
|
62
|
+
// V8 ~ Android 4.3-
|
|
63
|
+
$toFixed.call({});
|
|
64
|
+
})), 'Number', {
|
|
65
|
+
toFixed: function toFixed(fractionDigits){
|
|
66
|
+
var x = aNumberValue(this, ERROR)
|
|
67
|
+
, f = toInteger(fractionDigits)
|
|
68
|
+
, s = ''
|
|
69
|
+
, m = ZERO
|
|
70
|
+
, e, z, j, k;
|
|
71
|
+
if(f < 0 || f > 20)throw RangeError(ERROR);
|
|
72
|
+
if(x != x)return 'NaN';
|
|
73
|
+
if(x <= -1e21 || x >= 1e21)return String(x);
|
|
74
|
+
if(x < 0){
|
|
75
|
+
s = '-';
|
|
76
|
+
x = -x;
|
|
77
|
+
}
|
|
78
|
+
if(x > 1e-21){
|
|
79
|
+
e = log(x * pow(2, 69, 1)) - 69;
|
|
80
|
+
z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
|
|
81
|
+
z *= 0x10000000000000;
|
|
82
|
+
e = 52 - e;
|
|
83
|
+
if(e > 0){
|
|
84
|
+
multiply(0, z);
|
|
85
|
+
j = f;
|
|
86
|
+
while(j >= 7){
|
|
87
|
+
multiply(1e7, 0);
|
|
88
|
+
j -= 7;
|
|
89
|
+
}
|
|
90
|
+
multiply(pow(10, j, 1), 0);
|
|
91
|
+
j = e - 1;
|
|
92
|
+
while(j >= 23){
|
|
93
|
+
divide(1 << 23);
|
|
94
|
+
j -= 23;
|
|
95
|
+
}
|
|
96
|
+
divide(1 << j);
|
|
97
|
+
multiply(1, 1);
|
|
98
|
+
divide(2);
|
|
99
|
+
m = numToString();
|
|
100
|
+
} else {
|
|
101
|
+
multiply(0, z);
|
|
102
|
+
multiply(1 << -e, 0);
|
|
103
|
+
m = numToString() + repeat.call(ZERO, f);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if(f > 0){
|
|
107
|
+
k = m.length;
|
|
108
|
+
m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
|
|
109
|
+
} else {
|
|
110
|
+
m = s + m;
|
|
111
|
+
} return m;
|
|
112
|
+
}
|
|
114
113
|
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var $export = require('./_export')
|
|
3
|
-
, $fails = require('./_fails')
|
|
4
|
-
, aNumberValue = require('./_a-number-value')
|
|
5
|
-
, $toPrecision = 1..toPrecision;
|
|
6
|
-
|
|
7
|
-
$export($export.P + $export.F * ($fails(function(){
|
|
8
|
-
// IE7-
|
|
9
|
-
return $toPrecision.call(1, undefined) !== '1';
|
|
10
|
-
}) || !$fails(function(){
|
|
11
|
-
// V8 ~ Android 4.3-
|
|
12
|
-
$toPrecision.call({});
|
|
13
|
-
})), 'Number', {
|
|
14
|
-
toPrecision: function toPrecision(precision){
|
|
15
|
-
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
|
|
16
|
-
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
|
|
17
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, $fails = require('./_fails')
|
|
4
|
+
, aNumberValue = require('./_a-number-value')
|
|
5
|
+
, $toPrecision = 1..toPrecision;
|
|
6
|
+
|
|
7
|
+
$export($export.P + $export.F * ($fails(function(){
|
|
8
|
+
// IE7-
|
|
9
|
+
return $toPrecision.call(1, undefined) !== '1';
|
|
10
|
+
}) || !$fails(function(){
|
|
11
|
+
// V8 ~ Android 4.3-
|
|
12
|
+
$toPrecision.call({});
|
|
13
|
+
})), 'Number', {
|
|
14
|
+
toPrecision: function toPrecision(precision){
|
|
15
|
+
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
|
|
16
|
+
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
|
|
17
|
+
}
|
|
18
18
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var $export = require('./_export')
|
|
2
|
-
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
1
|
+
var $export = require('./_export')
|
|
2
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
3
3
|
$export($export.S, 'Object', {create: require('./_object-create')});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var $export = require('./_export');
|
|
2
|
-
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
|
|
1
|
+
var $export = require('./_export');
|
|
2
|
+
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
|
|
3
3
|
$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var $export = require('./_export');
|
|
2
|
-
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
1
|
+
var $export = require('./_export');
|
|
2
|
+
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
3
3
|
$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $export = require('./_export')
|
|
2
|
-
, $parseFloat = require('./_parse-float');
|
|
3
|
-
// 18.2.4 parseFloat(string)
|
|
1
|
+
var $export = require('./_export')
|
|
2
|
+
, $parseFloat = require('./_parse-float');
|
|
3
|
+
// 18.2.4 parseFloat(string)
|
|
4
4
|
$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $export = require('./_export')
|
|
2
|
-
, $parseInt = require('./_parse-int');
|
|
3
|
-
// 18.2.5 parseInt(string, radix)
|
|
1
|
+
var $export = require('./_export')
|
|
2
|
+
, $parseInt = require('./_parse-int');
|
|
3
|
+
// 18.2.5 parseInt(string, radix)
|
|
4
4
|
$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
|
|
@@ -5,14 +5,12 @@ var LIBRARY = require('./_library')
|
|
|
5
5
|
, classof = require('./_classof')
|
|
6
6
|
, $export = require('./_export')
|
|
7
7
|
, isObject = require('./_is-object')
|
|
8
|
-
, anObject = require('./_an-object')
|
|
9
8
|
, aFunction = require('./_a-function')
|
|
10
9
|
, anInstance = require('./_an-instance')
|
|
11
10
|
, forOf = require('./_for-of')
|
|
12
|
-
, setProto = require('./_set-proto').set
|
|
13
11
|
, speciesConstructor = require('./_species-constructor')
|
|
14
12
|
, task = require('./_task').set
|
|
15
|
-
, microtask = require('./_microtask')
|
|
13
|
+
, microtask = require('./_microtask')()
|
|
16
14
|
, PROMISE = 'Promise'
|
|
17
15
|
, TypeError = global.TypeError
|
|
18
16
|
, process = global.process
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
|
|
2
|
-
var $export
|
|
3
|
-
,
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var $export = require('./_export')
|
|
3
|
+
, aFunction = require('./_a-function')
|
|
4
|
+
, anObject = require('./_an-object')
|
|
5
|
+
, rApply = (require('./_global').Reflect || {}).apply
|
|
6
|
+
, fApply = Function.apply;
|
|
7
|
+
// MS Edge argumentsList argument is optional
|
|
8
|
+
$export($export.S + $export.F * !require('./_fails')(function(){
|
|
9
|
+
rApply(function(){});
|
|
10
|
+
}), 'Reflect', {
|
|
6
11
|
apply: function apply(target, thisArgument, argumentsList){
|
|
7
|
-
|
|
12
|
+
var T = aFunction(target)
|
|
13
|
+
, L = anObject(argumentsList);
|
|
14
|
+
return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
|
|
8
15
|
}
|
|
9
16
|
});
|