core-js 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/shim.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * core-js 2.3.0
2
+ * core-js 2.4.0
3
3
  * https://github.com/zloirock/core-js
4
4
  * License: http://rock.mit-license.org
5
5
  * © 2016 Denis Pushkarev
@@ -225,7 +225,8 @@
225
225
  __webpack_require__(285);
226
226
  __webpack_require__(286);
227
227
  __webpack_require__(287);
228
- module.exports = __webpack_require__(288);
228
+ __webpack_require__(288);
229
+ module.exports = __webpack_require__(289);
229
230
 
230
231
 
231
232
  /***/ },
@@ -271,6 +272,7 @@
271
272
  , isEnum = {}.propertyIsEnumerable
272
273
  , SymbolRegistry = shared('symbol-registry')
273
274
  , AllSymbols = shared('symbols')
275
+ , OPSymbols = shared('op-symbols')
274
276
  , ObjectProto = Object[PROTOTYPE]
275
277
  , USE_NATIVE = typeof $Symbol == 'function'
276
278
  , QObject = global.QObject;
@@ -302,6 +304,7 @@
302
304
  };
303
305
 
304
306
  var $defineProperty = function defineProperty(it, key, D){
307
+ if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
305
308
  anObject(it);
306
309
  key = toPrimitive(key, true);
307
310
  anObject(D);
@@ -329,10 +332,14 @@
329
332
  };
330
333
  var $propertyIsEnumerable = function propertyIsEnumerable(key){
331
334
  var E = isEnum.call(this, key = toPrimitive(key, true));
335
+ if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
332
336
  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
333
337
  };
334
338
  var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
335
- var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
339
+ it = toIObject(it);
340
+ key = toPrimitive(key, true);
341
+ if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
342
+ var D = gOPD(it, key);
336
343
  if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
337
344
  return D;
338
345
  };
@@ -341,16 +348,19 @@
341
348
  , result = []
342
349
  , i = 0
343
350
  , key;
344
- while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
345
- return result;
351
+ while(names.length > i){
352
+ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
353
+ } return result;
346
354
  };
347
355
  var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
348
- var names = gOPN(toIObject(it))
356
+ var IS_OP = it === ObjectProto
357
+ , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
349
358
  , result = []
350
359
  , i = 0
351
360
  , key;
352
- while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
353
- return result;
361
+ while(names.length > i){
362
+ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
363
+ } return result;
354
364
  };
355
365
 
356
366
  // 19.4.1.1 Symbol([description])
@@ -358,13 +368,12 @@
358
368
  $Symbol = function Symbol(){
359
369
  if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
360
370
  var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
361
- DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
362
- configurable: true,
363
- set: function(value){
364
- if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
365
- setSymbolDesc(this, tag, createDesc(1, value));
366
- }
367
- });
371
+ var $set = function(value){
372
+ if(this === ObjectProto)$set.call(OPSymbols, value);
373
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
374
+ setSymbolDesc(this, tag, createDesc(1, value));
375
+ };
376
+ if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
368
377
  return wrap(tag);
369
378
  };
370
379
  redefine($Symbol[PROTOTYPE], 'toString', function toString(){
@@ -551,7 +560,7 @@
551
560
  /* 7 */
552
561
  /***/ function(module, exports) {
553
562
 
554
- var core = module.exports = {version: '2.3.0'};
563
+ var core = module.exports = {version: '2.4.0'};
555
564
  if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
556
565
 
557
566
  /***/ },
@@ -4227,20 +4236,26 @@
4227
4236
  , isArrayIter = __webpack_require__(155)
4228
4237
  , anObject = __webpack_require__(10)
4229
4238
  , toLength = __webpack_require__(35)
4230
- , getIterFn = __webpack_require__(157);
4231
- module.exports = function(iterable, entries, fn, that, ITERATOR){
4239
+ , getIterFn = __webpack_require__(157)
4240
+ , BREAK = {}
4241
+ , RETURN = {};
4242
+ var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
4232
4243
  var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
4233
4244
  , f = ctx(fn, that, entries ? 2 : 1)
4234
4245
  , index = 0
4235
- , length, step, iterator;
4246
+ , length, step, iterator, result;
4236
4247
  if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
4237
4248
  // fast case for arrays with default iterator
4238
4249
  if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
4239
- entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
4250
+ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
4251
+ if(result === BREAK || result === RETURN)return result;
4240
4252
  } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
4241
- call(iterator, f, step.value, entries);
4253
+ result = call(iterator, f, step.value, entries);
4254
+ if(result === BREAK || result === RETURN)return result;
4242
4255
  }
4243
4256
  };
4257
+ exports.BREAK = BREAK;
4258
+ exports.RETURN = RETURN;
4244
4259
 
4245
4260
  /***/ },
4246
4261
  /* 199 */
@@ -4867,12 +4882,14 @@
4867
4882
  /***/ function(module, exports, __webpack_require__) {
4868
4883
 
4869
4884
  // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
4870
- var $export = __webpack_require__(6)
4871
- , _apply = Function.apply;
4885
+ var $export = __webpack_require__(6)
4886
+ , aFunction = __webpack_require__(19)
4887
+ , anObject = __webpack_require__(10)
4888
+ , _apply = Function.apply;
4872
4889
 
4873
4890
  $export($export.S, 'Reflect', {
4874
4891
  apply: function apply(target, thisArgument, argumentsList){
4875
- return _apply.call(target, thisArgument, argumentsList);
4892
+ return _apply.call(aFunction(target), thisArgument, anObject(argumentsList));
4876
4893
  }
4877
4894
  });
4878
4895
 
@@ -4896,10 +4913,11 @@
4896
4913
  }), 'Reflect', {
4897
4914
  construct: function construct(Target, args /*, newTarget*/){
4898
4915
  aFunction(Target);
4916
+ anObject(args);
4899
4917
  var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
4900
4918
  if(Target == newTarget){
4901
4919
  // w/o altered newTarget, optimization for 0-4 arguments
4902
- if(args != undefined)switch(anObject(args).length){
4920
+ switch(args.length){
4903
4921
  case 0: return new Target;
4904
4922
  case 1: return new Target(args[0]);
4905
4923
  case 2: return new Target(args[0], args[1]);
@@ -6939,6 +6957,210 @@
6939
6957
 
6940
6958
  /***/ },
6941
6959
  /* 286 */
6960
+ /***/ function(module, exports, __webpack_require__) {
6961
+
6962
+ 'use strict';
6963
+ // https://github.com/zenparsing/es-observable
6964
+ var $export = __webpack_require__(6)
6965
+ , global = __webpack_require__(2)
6966
+ , core = __webpack_require__(7)
6967
+ , microtask = __webpack_require__(201)()
6968
+ , OBSERVABLE = __webpack_require__(23)('observable')
6969
+ , aFunction = __webpack_require__(19)
6970
+ , anObject = __webpack_require__(10)
6971
+ , anInstance = __webpack_require__(84)
6972
+ , redefineAll = __webpack_require__(202)
6973
+ , hide = __webpack_require__(8)
6974
+ , forOf = __webpack_require__(198)
6975
+ , RETURN = forOf.RETURN;
6976
+
6977
+ var getMethod = function(fn){
6978
+ return fn == null ? undefined : aFunction(fn);
6979
+ };
6980
+
6981
+ var cleanupSubscription = function(subscription){
6982
+ var cleanup = subscription._c;
6983
+ if(cleanup){
6984
+ subscription._c = undefined;
6985
+ cleanup();
6986
+ }
6987
+ };
6988
+
6989
+ var subscriptionClosed = function(subscription){
6990
+ return subscription._o === undefined;
6991
+ };
6992
+
6993
+ var closeSubscription = function(subscription){
6994
+ if(!subscriptionClosed(subscription)){
6995
+ subscription._o = undefined;
6996
+ cleanupSubscription(subscription);
6997
+ }
6998
+ };
6999
+
7000
+ var Subscription = function(observer, subscriber){
7001
+ anObject(observer);
7002
+ this._c = undefined;
7003
+ this._o = observer;
7004
+ observer = new SubscriptionObserver(this);
7005
+ try {
7006
+ var cleanup = subscriber(observer)
7007
+ , subscription = cleanup;
7008
+ if(cleanup != null){
7009
+ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); };
7010
+ else aFunction(cleanup);
7011
+ this._c = cleanup;
7012
+ }
7013
+ } catch(e){
7014
+ observer.error(e);
7015
+ return;
7016
+ } if(subscriptionClosed(this))cleanupSubscription(this);
7017
+ };
7018
+
7019
+ Subscription.prototype = redefineAll({}, {
7020
+ unsubscribe: function unsubscribe(){ closeSubscription(this); }
7021
+ });
7022
+
7023
+ var SubscriptionObserver = function(subscription){
7024
+ this._s = subscription;
7025
+ };
7026
+
7027
+ SubscriptionObserver.prototype = redefineAll({}, {
7028
+ next: function next(value){
7029
+ var subscription = this._s;
7030
+ if(!subscriptionClosed(subscription)){
7031
+ var observer = subscription._o;
7032
+ try {
7033
+ var m = getMethod(observer.next);
7034
+ if(m)return m.call(observer, value);
7035
+ } catch(e){
7036
+ try {
7037
+ closeSubscription(subscription);
7038
+ } finally {
7039
+ throw e;
7040
+ }
7041
+ }
7042
+ }
7043
+ },
7044
+ error: function error(value){
7045
+ var subscription = this._s;
7046
+ if(subscriptionClosed(subscription))throw value;
7047
+ var observer = subscription._o;
7048
+ subscription._o = undefined;
7049
+ try {
7050
+ var m = getMethod(observer.error);
7051
+ if(!m)throw value;
7052
+ value = m.call(observer, value);
7053
+ } catch(e){
7054
+ try {
7055
+ cleanupSubscription(subscription);
7056
+ } finally {
7057
+ throw e;
7058
+ }
7059
+ } cleanupSubscription(subscription);
7060
+ return value;
7061
+ },
7062
+ complete: function complete(value){
7063
+ var subscription = this._s;
7064
+ if(!subscriptionClosed(subscription)){
7065
+ var observer = subscription._o;
7066
+ subscription._o = undefined;
7067
+ try {
7068
+ var m = getMethod(observer.complete);
7069
+ value = m ? m.call(observer, value) : undefined;
7070
+ } catch(e){
7071
+ try {
7072
+ cleanupSubscription(subscription);
7073
+ } finally {
7074
+ throw e;
7075
+ }
7076
+ } cleanupSubscription(subscription);
7077
+ return value;
7078
+ }
7079
+ }
7080
+ });
7081
+
7082
+ var $Observable = function Observable(subscriber){
7083
+ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
7084
+ };
7085
+
7086
+ redefineAll($Observable.prototype, {
7087
+ subscribe: function subscribe(observer){
7088
+ return new Subscription(observer, this._f);
7089
+ },
7090
+ forEach: function forEach(fn){
7091
+ var that = this;
7092
+ return new (core.Promise || global.Promise)(function(resolve, reject){
7093
+ aFunction(fn);
7094
+ var subscription = that.subscribe({
7095
+ next : function(value){
7096
+ try {
7097
+ return fn(value);
7098
+ } catch(e){
7099
+ reject(e);
7100
+ subscription.unsubscribe();
7101
+ }
7102
+ },
7103
+ error: reject,
7104
+ complete: resolve
7105
+ });
7106
+ });
7107
+ }
7108
+ });
7109
+
7110
+ redefineAll($Observable, {
7111
+ from: function from(x){
7112
+ var C = typeof this === 'function' ? this : $Observable;
7113
+ var method = getMethod(anObject(x)[OBSERVABLE]);
7114
+ if(method){
7115
+ var observable = anObject(method.call(x));
7116
+ return observable.constructor === C ? observable : new C(function(observer){
7117
+ return observable.subscribe(observer);
7118
+ });
7119
+ }
7120
+ return new C(function(observer){
7121
+ var done = false;
7122
+ microtask(function(){
7123
+ if(!done){
7124
+ try {
7125
+ if(forOf(x, false, function(it){
7126
+ observer.next(it);
7127
+ if(done)return RETURN;
7128
+ }) === RETURN)return;
7129
+ } catch(e){
7130
+ if(done)throw e;
7131
+ observer.error(e);
7132
+ return;
7133
+ } observer.complete();
7134
+ }
7135
+ });
7136
+ return function(){ done = true; };
7137
+ });
7138
+ },
7139
+ of: function of(){
7140
+ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++];
7141
+ return new (typeof this === 'function' ? this : $Observable)(function(observer){
7142
+ var done = false;
7143
+ microtask(function(){
7144
+ if(!done){
7145
+ for(var i = 0; i < items.length; ++i){
7146
+ observer.next(items[i]);
7147
+ if(done)return;
7148
+ } observer.complete();
7149
+ }
7150
+ });
7151
+ return function(){ done = true; };
7152
+ });
7153
+ }
7154
+ });
7155
+
7156
+ hide($Observable.prototype, OBSERVABLE, function(){ return this; });
7157
+
7158
+ $export($export.G, {Observable: $Observable});
7159
+
7160
+ __webpack_require__(187)('Observable');
7161
+
7162
+ /***/ },
7163
+ /* 287 */
6942
7164
  /***/ function(module, exports, __webpack_require__) {
6943
7165
 
6944
7166
  var $export = __webpack_require__(6)
@@ -6949,7 +7171,7 @@
6949
7171
  });
6950
7172
 
6951
7173
  /***/ },
6952
- /* 287 */
7174
+ /* 288 */
6953
7175
  /***/ function(module, exports, __webpack_require__) {
6954
7176
 
6955
7177
  var $iterators = __webpack_require__(184)
@@ -6976,14 +7198,14 @@
6976
7198
  }
6977
7199
 
6978
7200
  /***/ },
6979
- /* 288 */
7201
+ /* 289 */
6980
7202
  /***/ function(module, exports, __webpack_require__) {
6981
7203
 
6982
7204
  // ie9- setTimeout & setInterval additional parameters fix
6983
7205
  var global = __webpack_require__(2)
6984
7206
  , $export = __webpack_require__(6)
6985
7207
  , invoke = __webpack_require__(76)
6986
- , partial = __webpack_require__(289)
7208
+ , partial = __webpack_require__(290)
6987
7209
  , navigator = global.navigator
6988
7210
  , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
6989
7211
  var wrap = function(set){
@@ -7001,11 +7223,11 @@
7001
7223
  });
7002
7224
 
7003
7225
  /***/ },
7004
- /* 289 */
7226
+ /* 290 */
7005
7227
  /***/ function(module, exports, __webpack_require__) {
7006
7228
 
7007
7229
  'use strict';
7008
- var path = __webpack_require__(290)
7230
+ var path = __webpack_require__(291)
7009
7231
  , invoke = __webpack_require__(76)
7010
7232
  , aFunction = __webpack_require__(19);
7011
7233
  module.exports = function(/* ...pargs */){
@@ -7029,7 +7251,7 @@
7029
7251
  };
7030
7252
 
7031
7253
  /***/ },
7032
- /* 290 */
7254
+ /* 291 */
7033
7255
  /***/ function(module, exports, __webpack_require__) {
7034
7256
 
7035
7257
  module.exports = __webpack_require__(2);