core-js 1.2.3 → 1.2.7
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 +408 -386
- package/bower.json +1 -1
- package/build/Gruntfile.ls +0 -5
- package/build/build.ls +24 -22
- package/build/index.js +2 -2
- package/client/core.js +1412 -1272
- package/client/core.min.js +4 -4
- package/client/core.min.js.map +1 -1
- package/client/library.js +1220 -1122
- package/client/library.min.js +4 -4
- package/client/library.min.js.map +1 -1
- package/client/shim.js +1304 -1164
- package/client/shim.min.js +4 -4
- package/client/shim.min.js.map +1 -1
- package/es6/symbol.js +1 -0
- package/fn/symbol/index.js +1 -0
- package/library/es6/symbol.js +1 -0
- package/library/fn/symbol/index.js +1 -0
- package/library/modules/{$.unscope.js → $.add-to-unscopables.js} +0 -0
- package/library/modules/$.array-fill.js +1 -1
- package/library/modules/$.array-methods.js +2 -12
- package/library/modules/$.array-species-create.js +16 -0
- package/library/modules/$.buffer.js +278 -285
- package/library/modules/$.collection-strong.js +9 -8
- package/library/modules/$.collection-weak.js +16 -15
- package/library/modules/$.collection.js +21 -14
- package/library/modules/$.core.js +1 -1
- package/library/modules/{$.support-desc.js → $.descriptors.js} +0 -0
- package/library/modules/$.export.js +46 -0
- package/library/modules/$.fails-is-regexp.js +2 -1
- package/library/modules/$.fix-re-wks.js +10 -5
- package/library/modules/$.flags.js +5 -5
- package/library/modules/$.get-names.js +3 -3
- package/library/modules/$.hide.js +1 -1
- package/library/modules/$.is-array-iter.js +5 -3
- package/library/modules/$.iter-create.js +5 -3
- package/library/modules/$.iter-define.js +46 -30
- package/library/modules/$.iter-detect.js +8 -6
- package/library/modules/{$.expm1.js → $.math-expm1.js} +0 -0
- package/library/modules/{$.log1p.js → $.math-log1p.js} +0 -0
- package/library/modules/{$.sign.js → $.math-sign.js} +0 -0
- package/library/modules/$.microtask.js +9 -2
- package/library/modules/{$.assign.js → $.object-assign.js} +0 -0
- package/library/modules/$.object-sap.js +6 -4
- package/library/modules/$.redefine-all.js +5 -0
- package/library/modules/{$.redef.js → $.redefine.js} +0 -0
- package/library/modules/{$.same.js → $.same-value.js} +1 -0
- package/library/modules/$.set-species.js +13 -0
- package/library/modules/{$.tag.js → $.set-to-string-tag.js} +0 -0
- package/library/modules/$.species-constructor.js +7 -7
- package/library/modules/$.string-at.js +5 -6
- package/library/modules/$.string-trim.js +17 -14
- package/library/modules/$.task.js +0 -1
- package/library/modules/$.to-primitive.js +12 -0
- package/library/modules/$.typed-array.js +345 -294
- package/library/modules/$.typed.js +36 -0
- package/library/modules/$.wks.js +2 -1
- package/library/modules/core.delay.js +2 -2
- package/library/modules/core.dict.js +20 -19
- package/library/modules/core.function.part.js +3 -4
- package/library/modules/core.is-iterable.js +1 -1
- package/library/modules/core.log.js +2 -2
- package/library/modules/core.object.classof.js +2 -2
- package/library/modules/core.object.define.js +3 -3
- package/library/modules/core.object.is-object.js +2 -2
- package/library/modules/core.object.make.js +4 -4
- package/library/modules/core.string.escape-html.js +9 -9
- package/library/modules/core.string.unescape-html.js +9 -9
- package/library/modules/es5.js +61 -60
- package/library/modules/es6.array.copy-within.js +3 -4
- package/library/modules/es6.array.fill.js +3 -3
- package/library/modules/es6.array.find-index.js +6 -6
- package/library/modules/es6.array.find.js +6 -6
- package/library/modules/es6.array.from.js +2 -2
- package/library/modules/es6.array.iterator.js +8 -8
- package/library/modules/es6.array.of.js +2 -2
- package/library/modules/es6.array.species.js +1 -1
- package/library/modules/es6.date.to-string.js +0 -0
- package/library/modules/es6.math.acosh.js +5 -5
- package/library/modules/es6.math.asinh.js +2 -2
- package/library/modules/es6.math.atanh.js +2 -2
- package/library/modules/es6.math.cbrt.js +3 -3
- package/library/modules/es6.math.clz32.js +2 -2
- package/library/modules/es6.math.cosh.js +3 -3
- package/library/modules/es6.math.expm1.js +2 -2
- package/library/modules/es6.math.fround.js +4 -4
- package/library/modules/es6.math.hypot.js +3 -3
- package/library/modules/es6.math.imul.js +3 -3
- package/library/modules/es6.math.log10.js +2 -2
- package/library/modules/es6.math.log1p.js +2 -2
- package/library/modules/es6.math.log2.js +2 -2
- package/library/modules/es6.math.sign.js +2 -2
- package/library/modules/es6.math.sinh.js +4 -4
- package/library/modules/es6.math.tanh.js +4 -4
- package/library/modules/es6.math.trunc.js +2 -2
- package/library/modules/es6.number.epsilon.js +2 -2
- package/library/modules/es6.number.is-finite.js +2 -2
- package/library/modules/es6.number.is-integer.js +2 -2
- package/library/modules/es6.number.is-nan.js +2 -2
- package/library/modules/es6.number.is-safe-integer.js +2 -2
- package/library/modules/es6.number.max-safe-integer.js +2 -2
- package/library/modules/es6.number.min-safe-integer.js +2 -2
- package/library/modules/es6.number.parse-float.js +2 -2
- package/library/modules/es6.number.parse-int.js +2 -2
- package/library/modules/es6.object.assign.js +2 -2
- package/library/modules/es6.object.is.js +2 -4
- package/library/modules/es6.object.set-prototype-of.js +2 -2
- package/library/modules/es6.promise.js +96 -66
- package/library/modules/es6.reflect.apply.js +5 -4
- package/library/modules/es6.reflect.construct.js +4 -3
- package/library/modules/es6.reflect.define-property.js +2 -2
- package/library/modules/es6.reflect.delete-property.js +2 -2
- package/library/modules/es6.reflect.enumerate.js +2 -2
- package/library/modules/es6.reflect.get-own-property-descriptor.js +2 -2
- package/library/modules/es6.reflect.get-prototype-of.js +2 -2
- package/library/modules/es6.reflect.get.js +2 -2
- package/library/modules/es6.reflect.has.js +2 -2
- package/library/modules/es6.reflect.is-extensible.js +2 -2
- package/library/modules/es6.reflect.own-keys.js +2 -2
- package/library/modules/es6.reflect.prevent-extensions.js +2 -2
- package/library/modules/es6.reflect.set-prototype-of.js +2 -2
- package/library/modules/es6.reflect.set.js +2 -2
- package/library/modules/es6.regexp.constructor.js +1 -1
- package/library/modules/es6.string.code-point-at.js +3 -3
- package/library/modules/es6.string.ends-with.js +2 -2
- package/library/modules/es6.string.from-code-point.js +4 -4
- package/library/modules/es6.string.includes.js +4 -3
- package/library/modules/es6.string.raw.js +2 -2
- package/library/modules/es6.string.repeat.js +2 -2
- package/library/modules/es6.string.starts-with.js +2 -2
- package/library/modules/es6.symbol.js +17 -16
- package/library/modules/es6.typed.array-buffer.js +43 -0
- package/library/modules/es6.typed.data-view.js +4 -0
- package/library/modules/{es6.typed-arrays.float32-array.js → es6.typed.float32-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.float64-array.js → es6.typed.float64-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.int16-array.js → es6.typed.int16-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.int32-array.js → es6.typed.int32-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.int8-array.js → es6.typed.int8-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.uint16-array.js → es6.typed.uint16-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.uint32-array.js → es6.typed.uint32-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.uint8-array.js → es6.typed.uint8-array.js} +0 -0
- package/library/modules/{es6.typed-arrays.uint8-clamped-array.js → es6.typed.uint8-clamped-array.js} +0 -0
- package/library/modules/es6.weak-map.js +2 -1
- package/library/modules/es7.array.includes.js +5 -3
- package/library/modules/es7.map.to-json.js +2 -2
- package/library/modules/es7.object.entries.js +2 -2
- package/library/modules/es7.object.get-own-property-descriptors.js +2 -2
- package/library/modules/es7.object.values.js +2 -2
- package/library/modules/es7.regexp.escape.js +4 -3
- package/library/modules/es7.set.to-json.js +2 -2
- package/library/modules/es7.string.at.js +5 -4
- package/library/modules/es7.string.pad-left.js +4 -3
- package/library/modules/es7.string.pad-right.js +4 -3
- package/library/modules/js.array.statics.js +4 -3
- package/library/modules/web.immediate.js +3 -3
- package/library/modules/web.timers.js +2 -2
- package/modules/$.add-to-unscopables.js +7 -0
- package/modules/$.array-fill.js +1 -1
- package/modules/$.array-methods.js +2 -12
- package/modules/$.array-species-create.js +16 -0
- package/modules/$.buffer.js +278 -285
- package/modules/$.collection-strong.js +9 -8
- package/modules/$.collection-weak.js +16 -15
- package/modules/$.collection.js +37 -25
- package/modules/$.core.js +1 -1
- package/modules/{$.support-desc.js → $.descriptors.js} +0 -0
- package/modules/$.export.js +41 -0
- package/modules/$.fails-is-regexp.js +2 -1
- package/modules/$.fix-re-wks.js +10 -5
- package/modules/$.flags.js +5 -5
- package/modules/$.get-names.js +3 -3
- package/modules/$.hide.js +1 -1
- package/modules/$.is-array-iter.js +5 -3
- package/modules/$.iter-create.js +5 -3
- package/modules/$.iter-define.js +46 -30
- package/modules/$.iter-detect.js +8 -6
- package/modules/{$.expm1.js → $.math-expm1.js} +0 -0
- package/modules/{$.log1p.js → $.math-log1p.js} +0 -0
- package/modules/{$.sign.js → $.math-sign.js} +0 -0
- package/modules/$.microtask.js +9 -2
- package/modules/{$.assign.js → $.object-assign.js} +0 -0
- package/modules/$.object-sap.js +6 -4
- package/modules/$.redefine-all.js +5 -0
- package/modules/{$.redef.js → $.redefine.js} +0 -0
- package/modules/{$.same.js → $.same-value.js} +1 -0
- package/modules/$.set-species.js +13 -0
- package/modules/{$.tag.js → $.set-to-string-tag.js} +0 -0
- package/modules/$.species-constructor.js +7 -7
- package/modules/$.string-at.js +5 -6
- package/modules/$.string-trim.js +17 -14
- package/modules/$.task.js +0 -1
- package/modules/$.to-primitive.js +12 -0
- package/modules/$.typed-array.js +345 -294
- package/modules/$.typed.js +36 -0
- package/modules/$.wks.js +2 -1
- package/modules/core.delay.js +2 -2
- package/modules/core.dict.js +20 -19
- package/modules/core.function.part.js +3 -4
- package/modules/core.is-iterable.js +1 -1
- package/modules/core.log.js +2 -2
- package/modules/core.object.classof.js +2 -2
- package/modules/core.object.define.js +3 -3
- package/modules/core.object.is-object.js +2 -2
- package/modules/core.object.make.js +4 -4
- package/modules/core.string.escape-html.js +9 -9
- package/modules/core.string.unescape-html.js +9 -9
- package/modules/es5.js +61 -60
- package/modules/es6.array.copy-within.js +3 -4
- package/modules/es6.array.fill.js +3 -3
- package/modules/es6.array.find-index.js +6 -6
- package/modules/es6.array.find.js +6 -6
- package/modules/es6.array.from.js +2 -2
- package/modules/es6.array.iterator.js +8 -8
- package/modules/es6.array.of.js +2 -2
- package/modules/es6.array.species.js +1 -1
- package/modules/es6.date.to-string.js +10 -0
- package/modules/es6.function.name.js +1 -1
- package/modules/es6.math.acosh.js +5 -5
- package/modules/es6.math.asinh.js +2 -2
- package/modules/es6.math.atanh.js +2 -2
- package/modules/es6.math.cbrt.js +3 -3
- package/modules/es6.math.clz32.js +2 -2
- package/modules/es6.math.cosh.js +3 -3
- package/modules/es6.math.expm1.js +2 -2
- package/modules/es6.math.fround.js +4 -4
- package/modules/es6.math.hypot.js +3 -3
- package/modules/es6.math.imul.js +3 -3
- package/modules/es6.math.log10.js +2 -2
- package/modules/es6.math.log1p.js +2 -2
- package/modules/es6.math.log2.js +2 -2
- package/modules/es6.math.sign.js +2 -2
- package/modules/es6.math.sinh.js +4 -4
- package/modules/es6.math.tanh.js +4 -4
- package/modules/es6.math.trunc.js +2 -2
- package/modules/es6.number.constructor.js +43 -29
- package/modules/es6.number.epsilon.js +2 -2
- package/modules/es6.number.is-finite.js +2 -2
- package/modules/es6.number.is-integer.js +2 -2
- package/modules/es6.number.is-nan.js +2 -2
- package/modules/es6.number.is-safe-integer.js +2 -2
- package/modules/es6.number.max-safe-integer.js +2 -2
- package/modules/es6.number.min-safe-integer.js +2 -2
- package/modules/es6.number.parse-float.js +2 -2
- package/modules/es6.number.parse-int.js +2 -2
- package/modules/es6.object.assign.js +2 -2
- package/modules/es6.object.is.js +2 -4
- package/modules/es6.object.set-prototype-of.js +2 -2
- package/modules/es6.object.to-string.js +1 -1
- package/modules/es6.promise.js +96 -66
- package/modules/es6.reflect.apply.js +5 -4
- package/modules/es6.reflect.construct.js +4 -3
- package/modules/es6.reflect.define-property.js +2 -2
- package/modules/es6.reflect.delete-property.js +2 -2
- package/modules/es6.reflect.enumerate.js +2 -2
- package/modules/es6.reflect.get-own-property-descriptor.js +2 -2
- package/modules/es6.reflect.get-prototype-of.js +2 -2
- package/modules/es6.reflect.get.js +2 -2
- package/modules/es6.reflect.has.js +2 -2
- package/modules/es6.reflect.is-extensible.js +2 -2
- package/modules/es6.reflect.own-keys.js +2 -2
- package/modules/es6.reflect.prevent-extensions.js +2 -2
- package/modules/es6.reflect.set-prototype-of.js +2 -2
- package/modules/es6.reflect.set.js +2 -2
- package/modules/es6.regexp.constructor.js +3 -3
- package/modules/es6.regexp.flags.js +1 -1
- package/modules/es6.string.code-point-at.js +3 -3
- package/modules/es6.string.ends-with.js +2 -2
- package/modules/es6.string.from-code-point.js +4 -4
- package/modules/es6.string.includes.js +4 -3
- package/modules/es6.string.raw.js +2 -2
- package/modules/es6.string.repeat.js +2 -2
- package/modules/es6.string.starts-with.js +2 -2
- package/modules/es6.symbol.js +17 -16
- package/modules/es6.typed.array-buffer.js +43 -0
- package/modules/es6.typed.data-view.js +4 -0
- package/modules/{es6.typed-arrays.float32-array.js → es6.typed.float32-array.js} +0 -0
- package/modules/{es6.typed-arrays.float64-array.js → es6.typed.float64-array.js} +0 -0
- package/modules/{es6.typed-arrays.int16-array.js → es6.typed.int16-array.js} +0 -0
- package/modules/{es6.typed-arrays.int32-array.js → es6.typed.int32-array.js} +0 -0
- package/modules/{es6.typed-arrays.int8-array.js → es6.typed.int8-array.js} +0 -0
- package/modules/{es6.typed-arrays.uint16-array.js → es6.typed.uint16-array.js} +0 -0
- package/modules/{es6.typed-arrays.uint32-array.js → es6.typed.uint32-array.js} +0 -0
- package/modules/{es6.typed-arrays.uint8-array.js → es6.typed.uint8-array.js} +0 -0
- package/modules/{es6.typed-arrays.uint8-clamped-array.js → es6.typed.uint8-clamped-array.js} +0 -0
- package/modules/es6.weak-map.js +2 -1
- package/modules/es7.array.includes.js +5 -3
- package/modules/es7.map.to-json.js +2 -2
- package/modules/es7.object.entries.js +2 -2
- package/modules/es7.object.get-own-property-descriptors.js +2 -2
- package/modules/es7.object.values.js +2 -2
- package/modules/es7.regexp.escape.js +4 -3
- package/modules/es7.set.to-json.js +2 -2
- package/modules/es7.string.at.js +5 -4
- package/modules/es7.string.pad-left.js +4 -3
- package/modules/es7.string.pad-right.js +4 -3
- package/modules/js.array.statics.js +4 -3
- package/modules/library/{$.unscope.js → $.add-to-unscopables.js} +0 -0
- package/modules/library/$.collection.js +21 -14
- package/modules/library/$.export.js +46 -0
- package/modules/library/{$.redef.js → $.redefine.js} +0 -0
- package/modules/library/$.set-species.js +13 -0
- package/modules/library/es6.date.to-string.js +0 -0
- package/modules/library/es6.regexp.constructor.js +1 -1
- package/modules/web.dom.iterable.js +2 -2
- package/modules/web.immediate.js +3 -3
- package/modules/web.timers.js +2 -2
- package/package.json +6 -6
- package/README.md +0 -1289
- package/library/modules/$.def.js +0 -47
- package/library/modules/$.mix.js +0 -5
- package/library/modules/$.species.js +0 -9
- package/library/modules/es6.typed-arrays.array-buffer.js +0 -33
- package/library/modules/es6.typed-arrays.data-view.js +0 -4
- package/modules/$.def.js +0 -42
- package/modules/$.mix.js +0 -5
- package/modules/$.species.js +0 -9
- package/modules/$.unscope.js +0 -6
- package/modules/es6.typed-arrays.array-buffer.js +0 -33
- package/modules/es6.typed-arrays.data-view.js +0 -4
- package/modules/library/$.def.js +0 -47
package/modules/es6.symbol.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var $ = require('./$')
|
|
4
4
|
, global = require('./$.global')
|
|
5
5
|
, has = require('./$.has')
|
|
6
|
-
,
|
|
7
|
-
, $
|
|
8
|
-
,
|
|
6
|
+
, DESCRIPTORS = require('./$.descriptors')
|
|
7
|
+
, $export = require('./$.export')
|
|
8
|
+
, redefine = require('./$.redefine')
|
|
9
9
|
, $fails = require('./$.fails')
|
|
10
10
|
, shared = require('./$.shared')
|
|
11
|
-
,
|
|
11
|
+
, setToStringTag = require('./$.set-to-string-tag')
|
|
12
12
|
, uid = require('./$.uid')
|
|
13
13
|
, wks = require('./$.wks')
|
|
14
14
|
, keyOf = require('./$.keyof')
|
|
@@ -34,7 +34,7 @@ var $ = require('./$')
|
|
|
34
34
|
, ObjectProto = Object.prototype;
|
|
35
35
|
|
|
36
36
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
37
|
-
var setSymbolDesc =
|
|
37
|
+
var setSymbolDesc = DESCRIPTORS && $fails(function(){
|
|
38
38
|
return _create(setDesc({}, 'a', {
|
|
39
39
|
get: function(){ return setDesc(this, 'a', {value: 7}).a; }
|
|
40
40
|
})).a != 7;
|
|
@@ -48,7 +48,7 @@ var setSymbolDesc = SUPPORT_DESC && $fails(function(){
|
|
|
48
48
|
var wrap = function(tag){
|
|
49
49
|
var sym = AllSymbols[tag] = _create($Symbol.prototype);
|
|
50
50
|
sym._k = tag;
|
|
51
|
-
|
|
51
|
+
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
|
|
52
52
|
configurable: true,
|
|
53
53
|
set: function(value){
|
|
54
54
|
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
|
@@ -112,6 +112,7 @@ var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
|
|
|
112
112
|
return result;
|
|
113
113
|
};
|
|
114
114
|
var $stringify = function stringify(it){
|
|
115
|
+
if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
|
|
115
116
|
var args = [it]
|
|
116
117
|
, i = 1
|
|
117
118
|
, $$ = arguments
|
|
@@ -140,7 +141,7 @@ if(!useNative){
|
|
|
140
141
|
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
|
|
141
142
|
return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
|
|
142
143
|
};
|
|
143
|
-
|
|
144
|
+
redefine($Symbol.prototype, 'toString', function toString(){
|
|
144
145
|
return this._k;
|
|
145
146
|
});
|
|
146
147
|
|
|
@@ -156,8 +157,8 @@ if(!useNative){
|
|
|
156
157
|
$.getNames = $names.get = $getOwnPropertyNames;
|
|
157
158
|
$.getSymbols = $getOwnPropertySymbols;
|
|
158
159
|
|
|
159
|
-
if(
|
|
160
|
-
|
|
160
|
+
if(DESCRIPTORS && !require('./$.library')){
|
|
161
|
+
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
|
|
@@ -196,11 +197,11 @@ $.each.call((
|
|
|
196
197
|
|
|
197
198
|
setter = true;
|
|
198
199
|
|
|
199
|
-
$
|
|
200
|
+
$export($export.G + $export.W, {Symbol: $Symbol});
|
|
200
201
|
|
|
201
|
-
$
|
|
202
|
+
$export($export.S, 'Symbol', symbolStatics);
|
|
202
203
|
|
|
203
|
-
$
|
|
204
|
+
$export($export.S + $export.F * !useNative, 'Object', {
|
|
204
205
|
// 19.1.2.2 Object.create(O [, Properties])
|
|
205
206
|
create: $create,
|
|
206
207
|
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
|
@@ -216,11 +217,11 @@ $def($def.S + $def.F * !useNative, 'Object', {
|
|
|
216
217
|
});
|
|
217
218
|
|
|
218
219
|
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
|
219
|
-
$JSON && $
|
|
220
|
+
$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
|
|
220
221
|
|
|
221
222
|
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
|
222
|
-
|
|
223
|
+
setToStringTag($Symbol, 'Symbol');
|
|
223
224
|
// 20.2.1.9 Math[@@toStringTag]
|
|
224
|
-
|
|
225
|
+
setToStringTag(Math, 'Math', true);
|
|
225
226
|
// 24.3.3 JSON[@@toStringTag]
|
|
226
|
-
|
|
227
|
+
setToStringTag(global.JSON, 'JSON', true);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
if(require('./$.descriptors')){
|
|
3
|
+
var $export = require('./$.export')
|
|
4
|
+
, $typed = require('./$.typed')
|
|
5
|
+
, buffer = require('./$.buffer')
|
|
6
|
+
, toIndex = require('./$.to-index')
|
|
7
|
+
, toLength = require('./$.to-length')
|
|
8
|
+
, isObject = require('./$.is-object')
|
|
9
|
+
, TYPED_ARRAY = require('./$.wks')('typed_array')
|
|
10
|
+
, $ArrayBuffer = buffer.ArrayBuffer
|
|
11
|
+
, $DataView = buffer.DataView
|
|
12
|
+
, $slice = $ArrayBuffer && $ArrayBuffer.prototype.slice
|
|
13
|
+
, VIEW = $typed.VIEW
|
|
14
|
+
, ARRAY_BUFFER = 'ArrayBuffer';
|
|
15
|
+
|
|
16
|
+
$export($export.G + $export.W + $export.F * !$typed.ABV, {ArrayBuffer: $ArrayBuffer});
|
|
17
|
+
|
|
18
|
+
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
|
|
19
|
+
// 24.1.3.1 ArrayBuffer.isView(arg)
|
|
20
|
+
isView: function isView(it){ // not cross-realm
|
|
21
|
+
return isObject(it) && VIEW in it;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
$export($export.P + $export.F * require('./$.fails')(function(){
|
|
26
|
+
return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
|
|
27
|
+
}), ARRAY_BUFFER, {
|
|
28
|
+
// 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
|
|
29
|
+
slice: function slice(start, end){
|
|
30
|
+
if($slice !== undefined && end === undefined)return $slice.call(this, start); // FF fix
|
|
31
|
+
var len = this.byteLength
|
|
32
|
+
, first = toIndex(start, len)
|
|
33
|
+
, final = toIndex(end === undefined ? len : end, len)
|
|
34
|
+
, result = new $ArrayBuffer(toLength(final - first))
|
|
35
|
+
, viewS = new $DataView(this)
|
|
36
|
+
, viewT = new $DataView(result)
|
|
37
|
+
, index = 0;
|
|
38
|
+
while(first < final){
|
|
39
|
+
viewT.setUint8(index++, viewS.getUint8(first++));
|
|
40
|
+
} return result;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/modules/{es6.typed-arrays.uint8-clamped-array.js → es6.typed.uint8-clamped-array.js}
RENAMED
|
File without changes
|
package/modules/es6.weak-map.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var $ = require('./$')
|
|
3
|
+
, redefine = require('./$.redefine')
|
|
3
4
|
, weak = require('./$.collection-weak')
|
|
4
5
|
, isObject = require('./$.is-object')
|
|
5
6
|
, has = require('./$.has')
|
|
@@ -30,7 +31,7 @@ if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
|
|
|
30
31
|
$.each.call(['delete', 'has', 'get', 'set'], function(key){
|
|
31
32
|
var proto = $WeakMap.prototype
|
|
32
33
|
, method = proto[key];
|
|
33
|
-
|
|
34
|
+
redefine(proto, key, function(a, b){
|
|
34
35
|
// store frozen objects on leaky map
|
|
35
36
|
if(isObject(a) && !isExtensible(a)){
|
|
36
37
|
var result = frozenStore(this)[key](a, b);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var $
|
|
2
|
+
var $export = require('./$.export')
|
|
3
3
|
, $includes = require('./$.array-includes')(true);
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
$export($export.P, 'Array', {
|
|
5
6
|
// https://github.com/domenic/Array.prototype.includes
|
|
6
7
|
includes: function includes(el /*, fromIndex = 0 */){
|
|
7
8
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
8
9
|
}
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
require('./$.add-to-unscopables')('includes');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
|
2
|
-
var $
|
|
2
|
+
var $export = require('./$.export');
|
|
3
3
|
|
|
4
|
-
$
|
|
4
|
+
$export($export.P, 'Map', {toJSON: require('./$.collection-to-json')('Map')});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// http://goo.gl/XkBrjD
|
|
2
|
-
var $
|
|
2
|
+
var $export = require('./$.export')
|
|
3
3
|
, $entries = require('./$.object-to-array')(true);
|
|
4
4
|
|
|
5
|
-
$
|
|
5
|
+
$export($export.S, 'Object', {
|
|
6
6
|
entries: function entries(it){
|
|
7
7
|
return $entries(it);
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// https://gist.github.com/WebReflection/9353781
|
|
2
2
|
var $ = require('./$')
|
|
3
|
-
, $
|
|
3
|
+
, $export = require('./$.export')
|
|
4
4
|
, ownKeys = require('./$.own-keys')
|
|
5
5
|
, toIObject = require('./$.to-iobject')
|
|
6
6
|
, createDesc = require('./$.property-desc');
|
|
7
7
|
|
|
8
|
-
$
|
|
8
|
+
$export($export.S, 'Object', {
|
|
9
9
|
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
|
|
10
10
|
var O = toIObject(object)
|
|
11
11
|
, setDesc = $.setDesc
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// http://goo.gl/XkBrjD
|
|
2
|
-
var $
|
|
2
|
+
var $export = require('./$.export')
|
|
3
3
|
, $values = require('./$.object-to-array')(false);
|
|
4
4
|
|
|
5
|
-
$
|
|
5
|
+
$export($export.S, 'Object', {
|
|
6
6
|
values: function values(it){
|
|
7
7
|
return $values(it);
|
|
8
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// https://github.com/benjamingr/RexExp.escape
|
|
2
|
-
var $
|
|
3
|
-
, $re
|
|
4
|
-
|
|
2
|
+
var $export = require('./$.export')
|
|
3
|
+
, $re = require('./$.replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
4
|
+
|
|
5
|
+
$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
|
2
|
-
var $
|
|
2
|
+
var $export = require('./$.export');
|
|
3
3
|
|
|
4
|
-
$
|
|
4
|
+
$export($export.P, 'Set', {toJSON: require('./$.collection-to-json')('Set')});
|
package/modules/es7.string.at.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
|
2
1
|
'use strict';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$
|
|
2
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
3
|
+
var $export = require('./$.export')
|
|
4
|
+
, $at = require('./$.string-at')(true);
|
|
5
|
+
|
|
6
|
+
$export($export.P, 'String', {
|
|
6
7
|
at: function at(pos){
|
|
7
8
|
return $at(this, pos);
|
|
8
9
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var $
|
|
3
|
-
, $pad
|
|
4
|
-
|
|
2
|
+
var $export = require('./$.export')
|
|
3
|
+
, $pad = require('./$.string-pad');
|
|
4
|
+
|
|
5
|
+
$export($export.P, 'String', {
|
|
5
6
|
padLeft: function padLeft(maxLength /*, fillString = ' ' */){
|
|
6
7
|
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var $
|
|
3
|
-
, $pad
|
|
4
|
-
|
|
2
|
+
var $export = require('./$.export')
|
|
3
|
+
, $pad = require('./$.string-pad');
|
|
4
|
+
|
|
5
|
+
$export($export.P, 'String', {
|
|
5
6
|
padRight: function padRight(maxLength /*, fillString = ' ' */){
|
|
6
7
|
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
|
|
7
8
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// JavaScript 1.6 / Strawman array statics shim
|
|
2
2
|
var $ = require('./$')
|
|
3
|
-
, $
|
|
3
|
+
, $export = require('./$.export')
|
|
4
|
+
, $ctx = require('./$.ctx')
|
|
4
5
|
, $Array = require('./$.core').Array || Array
|
|
5
6
|
, statics = {};
|
|
6
7
|
var setStatics = function(keys, length){
|
|
7
8
|
$.each.call(keys.split(','), function(key){
|
|
8
9
|
if(length == undefined && key in $Array)statics[key] = $Array[key];
|
|
9
|
-
else if(key in [])statics[key] =
|
|
10
|
+
else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
|
|
10
11
|
});
|
|
11
12
|
};
|
|
12
13
|
setStatics('pop,reverse,shift,keys,values,entries', 1);
|
|
13
14
|
setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
|
|
14
15
|
setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
|
|
15
16
|
'reduce,reduceRight,copyWithin,fill');
|
|
16
|
-
$
|
|
17
|
+
$export($export.S, 'Array', statics);
|
|
File without changes
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var $
|
|
3
|
-
,
|
|
4
|
-
,
|
|
5
|
-
,
|
|
6
|
-
,
|
|
2
|
+
var $ = require('./$')
|
|
3
|
+
, global = require('./$.global')
|
|
4
|
+
, $export = require('./$.export')
|
|
5
|
+
, fails = require('./$.fails')
|
|
6
|
+
, hide = require('./$.hide')
|
|
7
|
+
, redefineAll = require('./$.redefine-all')
|
|
8
|
+
, forOf = require('./$.for-of')
|
|
9
|
+
, strictNew = require('./$.strict-new')
|
|
10
|
+
, isObject = require('./$.is-object')
|
|
11
|
+
, setToStringTag = require('./$.set-to-string-tag')
|
|
12
|
+
, DESCRIPTORS = require('./$.descriptors');
|
|
7
13
|
|
|
8
14
|
module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
|
|
9
|
-
var Base =
|
|
15
|
+
var Base = global[NAME]
|
|
10
16
|
, C = Base
|
|
11
17
|
, ADDER = IS_MAP ? 'set' : 'add'
|
|
12
18
|
, proto = C && C.prototype
|
|
13
19
|
, O = {};
|
|
14
|
-
if(!
|
|
15
|
-
|
|
16
|
-
){
|
|
20
|
+
if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
|
|
21
|
+
new C().entries().next();
|
|
22
|
+
}))){
|
|
17
23
|
// create collection constructor
|
|
18
24
|
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
|
|
19
|
-
|
|
25
|
+
redefineAll(C.prototype, methods);
|
|
20
26
|
} else {
|
|
21
27
|
C = wrapper(function(target, iterable){
|
|
22
28
|
strictNew(target, C, NAME);
|
|
@@ -24,10 +30,11 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
|
|
|
24
30
|
if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target);
|
|
25
31
|
});
|
|
26
32
|
$.each.call('add,clear,delete,forEach,get,has,set,keys,values,entries'.split(','),function(KEY){
|
|
27
|
-
var
|
|
33
|
+
var IS_ADDER = KEY == 'add' || KEY == 'set';
|
|
28
34
|
if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){
|
|
35
|
+
if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false;
|
|
29
36
|
var result = this._c[KEY](a === 0 ? 0 : a, b);
|
|
30
|
-
return
|
|
37
|
+
return IS_ADDER ? this : result;
|
|
31
38
|
});
|
|
32
39
|
});
|
|
33
40
|
if('size' in proto)$.setDesc(C.prototype, 'size', {
|
|
@@ -37,10 +44,10 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
|
|
|
37
44
|
});
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
setToStringTag(C, NAME);
|
|
41
48
|
|
|
42
49
|
O[NAME] = C;
|
|
43
|
-
$
|
|
50
|
+
$export($export.G + $export.W + $export.F, O);
|
|
44
51
|
|
|
45
52
|
if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
|
|
46
53
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var global = require('./$.global')
|
|
2
|
+
, core = require('./$.core')
|
|
3
|
+
, ctx = require('./$.ctx')
|
|
4
|
+
, PROTOTYPE = 'prototype';
|
|
5
|
+
|
|
6
|
+
var $export = function(type, name, source){
|
|
7
|
+
var IS_FORCED = type & $export.F
|
|
8
|
+
, IS_GLOBAL = type & $export.G
|
|
9
|
+
, IS_STATIC = type & $export.S
|
|
10
|
+
, IS_PROTO = type & $export.P
|
|
11
|
+
, IS_BIND = type & $export.B
|
|
12
|
+
, IS_WRAP = type & $export.W
|
|
13
|
+
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
|
14
|
+
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
|
15
|
+
, key, own, out;
|
|
16
|
+
if(IS_GLOBAL)source = name;
|
|
17
|
+
for(key in source){
|
|
18
|
+
// contains in native
|
|
19
|
+
own = !IS_FORCED && target && key in target;
|
|
20
|
+
if(own && key in exports)continue;
|
|
21
|
+
// export native or passed
|
|
22
|
+
out = own ? target[key] : source[key];
|
|
23
|
+
// prevent global pollution for namespaces
|
|
24
|
+
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
|
25
|
+
// bind timers to global for call from export context
|
|
26
|
+
: IS_BIND && own ? ctx(out, global)
|
|
27
|
+
// wrap global constructors for prevent change them in library
|
|
28
|
+
: IS_WRAP && target[key] == out ? (function(C){
|
|
29
|
+
var F = function(param){
|
|
30
|
+
return this instanceof C ? new C(param) : C(param);
|
|
31
|
+
};
|
|
32
|
+
F[PROTOTYPE] = C[PROTOTYPE];
|
|
33
|
+
return F;
|
|
34
|
+
// make static versions for prototype methods
|
|
35
|
+
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
|
36
|
+
if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
// type bitmap
|
|
40
|
+
$export.F = 1; // forced
|
|
41
|
+
$export.G = 2; // global
|
|
42
|
+
$export.S = 4; // static
|
|
43
|
+
$export.P = 8; // proto
|
|
44
|
+
$export.B = 16; // bind
|
|
45
|
+
$export.W = 32; // wrap
|
|
46
|
+
module.exports = $export;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var core = require('./$.core')
|
|
3
|
+
, $ = require('./$')
|
|
4
|
+
, DESCRIPTORS = require('./$.descriptors')
|
|
5
|
+
, SPECIES = require('./$.wks')('species');
|
|
6
|
+
|
|
7
|
+
module.exports = function(KEY){
|
|
8
|
+
var C = core[KEY];
|
|
9
|
+
if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
|
|
10
|
+
configurable: true,
|
|
11
|
+
get: function(){ return this; }
|
|
12
|
+
});
|
|
13
|
+
};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require('./$.species')(RegExp);
|
|
1
|
+
require('./$.set-species')('RegExp');
|
|
@@ -8,5 +8,5 @@ var global = require('./$.global')
|
|
|
8
8
|
, NLProto = NL && NL.prototype
|
|
9
9
|
, HTCProto = HTC && HTC.prototype
|
|
10
10
|
, ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
|
|
11
|
-
if(
|
|
12
|
-
if(
|
|
11
|
+
if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
|
|
12
|
+
if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);
|
package/modules/web.immediate.js
CHANGED
package/modules/web.timers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ie9- setTimeout & setInterval additional parameters fix
|
|
2
2
|
var global = require('./$.global')
|
|
3
|
-
, $
|
|
3
|
+
, $export = require('./$.export')
|
|
4
4
|
, invoke = require('./$.invoke')
|
|
5
5
|
, partial = require('./$.partial')
|
|
6
6
|
, navigator = global.navigator
|
|
@@ -14,7 +14,7 @@ var wrap = function(set){
|
|
|
14
14
|
), time);
|
|
15
15
|
} : set;
|
|
16
16
|
};
|
|
17
|
-
$
|
|
17
|
+
$export($export.G + $export.B + $export.F * MSIE, {
|
|
18
18
|
setTimeout: wrap(global.setTimeout),
|
|
19
19
|
setInterval: wrap(global.setInterval)
|
|
20
20
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-js",
|
|
3
3
|
"description": "Standard library",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.7",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/zloirock/core-js.git"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"grunt": "0.4.x",
|
|
14
14
|
"grunt-cli": "0.1.x",
|
|
15
15
|
"grunt-livescript": "0.5.x",
|
|
16
|
-
"grunt-contrib-uglify": "0.
|
|
16
|
+
"grunt-contrib-uglify": "0.10.x",
|
|
17
17
|
"grunt-contrib-watch": "0.6.x",
|
|
18
18
|
"grunt-contrib-clean": "0.6.x",
|
|
19
19
|
"grunt-contrib-copy": "0.8.x",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"karma-ie-launcher": "0.2.x",
|
|
25
25
|
"karma-firefox-launcher": "0.1.x",
|
|
26
26
|
"karma-phantomjs-launcher": "0.2.x",
|
|
27
|
-
"karma-phantomjs2-launcher": "^0.3.2",
|
|
28
27
|
"promises-aplus-tests": "2.1.x",
|
|
29
|
-
"eslint": "
|
|
28
|
+
"eslint": "1.9.x",
|
|
29
|
+
"qunitjs": "1.23.x",
|
|
30
|
+
"phantomjs": "1.9.x"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"grunt": "grunt",
|
|
33
34
|
"lint": "eslint es5 es6 es7 js web core fn modules",
|
|
34
35
|
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter",
|
|
35
|
-
"test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs"
|
|
36
|
-
"lt": "npm run lint && npm run grunt livescript client karma:lt library karma:lt-library && npm run promises-tests && lsc tests/commonjs"
|
|
36
|
+
"test": "npm run lint && npm run grunt livescript client karma:continuous library karma:continuous-library && npm run promises-tests && lsc tests/commonjs"
|
|
37
37
|
},
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"keywords": [
|