rollbar 2.25.1 → 2.26.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.
@@ -1018,7 +1018,7 @@ module.exports = {
1018
1018
  "use strict";
1019
1019
 
1020
1020
 
1021
- var ErrorStackParser = __webpack_require__(22);
1021
+ var ErrorStackParser = __webpack_require__(24);
1022
1022
 
1023
1023
  var UNKNOWN_FUNCTION = '?';
1024
1024
  var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');
@@ -1354,12 +1354,12 @@ module.exports = rollbar;
1354
1354
 
1355
1355
 
1356
1356
  var Rollbar = __webpack_require__(9);
1357
- var telemeter = __webpack_require__(29);
1358
- var instrumenter = __webpack_require__(30);
1359
- var polyfillJSON = __webpack_require__(32);
1360
- var wrapGlobals = __webpack_require__(34);
1357
+ var telemeter = __webpack_require__(31);
1358
+ var instrumenter = __webpack_require__(32);
1359
+ var polyfillJSON = __webpack_require__(35);
1360
+ var wrapGlobals = __webpack_require__(37);
1361
1361
  var scrub = __webpack_require__(4);
1362
- var truncation = __webpack_require__(35);
1362
+ var truncation = __webpack_require__(38);
1363
1363
 
1364
1364
  Rollbar.setComponents({
1365
1365
  telemeter: telemeter,
@@ -1389,10 +1389,10 @@ var globals = __webpack_require__(19);
1389
1389
  var Transport = __webpack_require__(20);
1390
1390
  var urllib = __webpack_require__(2);
1391
1391
 
1392
- var transforms = __webpack_require__(21);
1393
- var sharedTransforms = __webpack_require__(24);
1394
- var predicates = __webpack_require__(25);
1395
- var sharedPredicates = __webpack_require__(26);
1392
+ var transforms = __webpack_require__(23);
1393
+ var sharedTransforms = __webpack_require__(26);
1394
+ var predicates = __webpack_require__(27);
1395
+ var sharedPredicates = __webpack_require__(28);
1396
1396
  var errorParser = __webpack_require__(3);
1397
1397
 
1398
1398
  function Rollbar(options, client) {
@@ -1921,8 +1921,8 @@ function _gWindow() {
1921
1921
  return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
1922
1922
  }
1923
1923
 
1924
- var defaults = __webpack_require__(27);
1925
- var scrubFields = __webpack_require__(28);
1924
+ var defaults = __webpack_require__(29);
1925
+ var scrubFields = __webpack_require__(30);
1926
1926
 
1927
1927
  var defaultOptions = {
1928
1928
  version: defaults.version,
@@ -2998,6 +2998,7 @@ function getTransportFromOptions(options, defaults, url) {
2998
2998
  var path = defaults.path;
2999
2999
  var search = defaults.search;
3000
3000
  var timeout = options.timeout;
3001
+ var transport = detectTransport(options)
3001
3002
 
3002
3003
  var proxy = options.proxy;
3003
3004
  if (options.endpoint) {
@@ -3015,16 +3016,26 @@ function getTransportFromOptions(options, defaults, url) {
3015
3016
  port: port,
3016
3017
  path: path,
3017
3018
  search: search,
3018
- proxy: proxy
3019
+ proxy: proxy,
3020
+ transport: transport
3019
3021
  };
3020
3022
  }
3021
3023
 
3024
+ function detectTransport(options) {
3025
+ var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
3026
+ var transport = options.defaultTransport || 'xhr';
3027
+ if (typeof gWindow.fetch === 'undefined') transport = 'xhr';
3028
+ if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';
3029
+ return transport;
3030
+ }
3031
+
3022
3032
  function transportOptions(transport, method) {
3023
3033
  var protocol = transport.protocol || 'https:';
3024
3034
  var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
3025
3035
  var hostname = transport.hostname;
3026
3036
  var path = transport.path;
3027
3037
  var timeout = transport.timeout;
3038
+ var transportAPI = transport.transport;
3028
3039
  if (transport.search) {
3029
3040
  path = path + transport.search;
3030
3041
  }
@@ -3040,7 +3051,8 @@ function transportOptions(transport, method) {
3040
3051
  hostname: hostname,
3041
3052
  path: path,
3042
3053
  port: port,
3043
- method: method
3054
+ method: method,
3055
+ transport: transportAPI
3044
3056
  };
3045
3057
  }
3046
3058
 
@@ -3242,10 +3254,9 @@ module.exports = {
3242
3254
  "use strict";
3243
3255
 
3244
3256
 
3245
- /*global XDomainRequest*/
3246
-
3247
3257
  var _ = __webpack_require__(0);
3248
- var logger = __webpack_require__(1);
3258
+ var makeFetchRequest = __webpack_require__(21);
3259
+ var makeXhrRequest = __webpack_require__(22);
3249
3260
 
3250
3261
  /*
3251
3262
  * accessToken may be embedded in payload but that should not
@@ -3257,6 +3268,7 @@ var logger = __webpack_require__(1);
3257
3268
  * path
3258
3269
  * port
3259
3270
  * method
3271
+ * transport ('xhr' | 'fetch')
3260
3272
  * }
3261
3273
  *
3262
3274
  * params is an object containing key/value pairs. These
@@ -3276,7 +3288,9 @@ Transport.prototype.get = function(accessToken, options, params, callback, reque
3276
3288
 
3277
3289
  var method = 'GET';
3278
3290
  var url = _.formatUrl(options);
3279
- _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);
3291
+ this._makeZoneRequest(
3292
+ accessToken, url, method, null, callback, requestFactory, options.timeout, options.transport
3293
+ );
3280
3294
  }
3281
3295
 
3282
3296
  Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {
@@ -3301,7 +3315,9 @@ Transport.prototype.post = function(accessToken, options, payload, callback, req
3301
3315
  var writeData = stringifyResult.value;
3302
3316
  var method = 'POST';
3303
3317
  var url = _.formatUrl(options);
3304
- _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);
3318
+ this._makeZoneRequest(
3319
+ accessToken, url, method, writeData, callback, requestFactory, options.timeout, options.transport
3320
+ );
3305
3321
  }
3306
3322
 
3307
3323
  Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {
@@ -3311,7 +3327,9 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa
3311
3327
 
3312
3328
  var method = 'POST';
3313
3329
  var url = _.formatUrl(options);
3314
- _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);
3330
+ this._makeZoneRequest(
3331
+ accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout, options.transport
3332
+ );
3315
3333
  }
3316
3334
 
3317
3335
 
@@ -3319,7 +3337,7 @@ Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayloa
3319
3337
  // so Angular change detection isn't triggered on each API call.
3320
3338
  // This is the equivalent of runOutsideAngular().
3321
3339
  //
3322
- function _makeZoneRequest() {
3340
+ Transport.prototype._makeZoneRequest = function () {
3323
3341
  var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
3324
3342
  var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
3325
3343
  var args = Array.prototype.slice.call(arguments);
@@ -3327,10 +3345,24 @@ function _makeZoneRequest() {
3327
3345
  if (currentZone && currentZone._name === 'angular') {
3328
3346
  var rootZone = currentZone._parent;
3329
3347
  rootZone.run(function () {
3330
- _makeRequest.apply(undefined, args);
3348
+ this._makeRequest.apply(undefined, args);
3331
3349
  });
3332
3350
  } else {
3333
- _makeRequest.apply(undefined, args);
3351
+ this._makeRequest.apply(undefined, args);
3352
+ }
3353
+ }
3354
+
3355
+ Transport.prototype._makeRequest = function (
3356
+ accessToken, url, method, data, callback, requestFactory, timeout, transport
3357
+ ) {
3358
+ if (typeof RollbarProxy !== 'undefined') {
3359
+ return _proxyRequest(data, callback);
3360
+ }
3361
+
3362
+ if (transport === 'fetch') {
3363
+ makeFetchRequest(accessToken, url, method, data, callback, timeout)
3364
+ } else {
3365
+ makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout)
3334
3366
  }
3335
3367
  }
3336
3368
 
@@ -3346,11 +3378,66 @@ function _proxyRequest(json, callback) {
3346
3378
  );
3347
3379
  }
3348
3380
 
3349
- function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
3350
- if (typeof RollbarProxy !== 'undefined') {
3351
- return _proxyRequest(data, callback);
3381
+ module.exports = Transport;
3382
+
3383
+
3384
+ /***/ }),
3385
+ /* 21 */
3386
+ /***/ (function(module, exports, __webpack_require__) {
3387
+
3388
+ "use strict";
3389
+
3390
+
3391
+ var logger = __webpack_require__(1);
3392
+ var _ = __webpack_require__(0);
3393
+
3394
+ function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
3395
+ var controller;
3396
+ var timeoutId;
3397
+
3398
+ if(_.isFiniteNumber(timeout)) {
3399
+ controller = new AbortController();
3400
+ timeoutId = setTimeout(() => controller.abort(), timeout);
3352
3401
  }
3353
3402
 
3403
+ fetch(url, {
3404
+ method: method,
3405
+ headers: {
3406
+ 'Content-Type': 'application/json',
3407
+ 'X-Rollbar-Access-Token': accessToken,
3408
+ signal: controller && controller.signal
3409
+ },
3410
+ body: data,
3411
+ })
3412
+ .then((response) => {
3413
+ if (timeoutId) clearTimeout(timeoutId);
3414
+ return response.json();
3415
+ })
3416
+ .then((data) => {
3417
+ callback(null, data);
3418
+ })
3419
+ .catch((error) => {
3420
+ logger.error(error.message);
3421
+ callback(error);
3422
+ });
3423
+ }
3424
+
3425
+ module.exports = makeFetchRequest;
3426
+
3427
+
3428
+ /***/ }),
3429
+ /* 22 */
3430
+ /***/ (function(module, exports, __webpack_require__) {
3431
+
3432
+ "use strict";
3433
+
3434
+
3435
+ /*global XDomainRequest*/
3436
+
3437
+ var _ = __webpack_require__(0);
3438
+ var logger = __webpack_require__(1);
3439
+
3440
+ function makeXhrRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
3354
3441
  var request;
3355
3442
  if (requestFactory) {
3356
3443
  request = requestFactory();
@@ -3503,11 +3590,11 @@ function _newRetriableError(message, code) {
3503
3590
  return err;
3504
3591
  }
3505
3592
 
3506
- module.exports = Transport;
3593
+ module.exports = makeXhrRequest;
3507
3594
 
3508
3595
 
3509
3596
  /***/ }),
3510
- /* 21 */
3597
+ /* 23 */
3511
3598
  /***/ (function(module, exports, __webpack_require__) {
3512
3599
 
3513
3600
  "use strict";
@@ -3594,20 +3681,25 @@ function addBaseInfo(item, options, callback) {
3594
3681
 
3595
3682
  function addRequestInfo(window) {
3596
3683
  return function(item, options, callback) {
3597
- if (!window || !window.location) {
3598
- return callback(null, item);
3684
+ var requestInfo = {};
3685
+
3686
+ if (window && window.location) {
3687
+ requestInfo.url = window.location.href;
3688
+ requestInfo.query_string = window.location.search;
3599
3689
  }
3690
+
3600
3691
  var remoteString = '$remote_ip';
3601
3692
  if (!options.captureIp) {
3602
3693
  remoteString = null;
3603
3694
  } else if (options.captureIp !== true) {
3604
3695
  remoteString += '_anonymize';
3605
3696
  }
3606
- _.set(item, 'data.request', {
3607
- url: window.location.href,
3608
- query_string: window.location.search,
3609
- user_ip: remoteString
3610
- });
3697
+ if (remoteString) requestInfo.user_ip = remoteString;
3698
+
3699
+ if (Object.keys(requestInfo).length > 0) {
3700
+ _.set(item, 'data.request', requestInfo);
3701
+ }
3702
+
3611
3703
  callback(null, item);
3612
3704
  };
3613
3705
  }
@@ -3849,7 +3941,7 @@ module.exports = {
3849
3941
 
3850
3942
 
3851
3943
  /***/ }),
3852
- /* 22 */
3944
+ /* 24 */
3853
3945
  /***/ (function(module, exports, __webpack_require__) {
3854
3946
 
3855
3947
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
@@ -3858,7 +3950,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
3858
3950
 
3859
3951
  /* istanbul ignore next */
3860
3952
  if (true) {
3861
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
3953
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(25)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
3862
3954
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
3863
3955
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
3864
3956
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -3909,21 +4001,21 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
3909
4001
  return filtered.map(function(line) {
3910
4002
  if (line.indexOf('(eval ') > -1) {
3911
4003
  // Throw away eval information until we implement stacktrace.js/stackframe#8
3912
- line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
4004
+ line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, '');
3913
4005
  }
3914
- var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
4006
+ var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, '');
3915
4007
 
3916
4008
  // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
3917
4009
  // case it has spaces in it, as the string is split on \s+ later on
3918
- var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
4010
+ var location = sanitizedLine.match(/ (\(.+\)$)/);
3919
4011
 
3920
4012
  // remove the parenthesized location from the line, if it was matched
3921
4013
  sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
3922
4014
 
3923
- var tokens = sanitizedLine.split(/\s+/).slice(1);
3924
- // if a location was matched, pass it to extractLocation() otherwise pop the last token
3925
- var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
3926
- var functionName = tokens.join(' ') || undefined;
4015
+ // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine
4016
+ // because this line doesn't have function name
4017
+ var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);
4018
+ var functionName = location && sanitizedLine || undefined;
3927
4019
  var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
3928
4020
 
3929
4021
  return new StackFrame({
@@ -4056,7 +4148,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
4056
4148
 
4057
4149
 
4058
4150
  /***/ }),
4059
- /* 23 */
4151
+ /* 25 */
4060
4152
  /***/ (function(module, exports, __webpack_require__) {
4061
4153
 
4062
4154
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
@@ -4204,7 +4296,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
4204
4296
 
4205
4297
 
4206
4298
  /***/ }),
4207
- /* 24 */
4299
+ /* 26 */
4208
4300
  /***/ (function(module, exports, __webpack_require__) {
4209
4301
 
4210
4302
  "use strict";
@@ -4361,7 +4453,7 @@ module.exports = {
4361
4453
 
4362
4454
 
4363
4455
  /***/ }),
4364
- /* 25 */
4456
+ /* 27 */
4365
4457
  /***/ (function(module, exports, __webpack_require__) {
4366
4458
 
4367
4459
  "use strict";
@@ -4382,7 +4474,7 @@ module.exports = {
4382
4474
 
4383
4475
 
4384
4476
  /***/ }),
4385
- /* 26 */
4477
+ /* 28 */
4386
4478
  /***/ (function(module, exports, __webpack_require__) {
4387
4479
 
4388
4480
  "use strict";
@@ -4584,14 +4676,14 @@ module.exports = {
4584
4676
 
4585
4677
 
4586
4678
  /***/ }),
4587
- /* 27 */
4679
+ /* 29 */
4588
4680
  /***/ (function(module, exports, __webpack_require__) {
4589
4681
 
4590
4682
  "use strict";
4591
4683
 
4592
4684
 
4593
4685
  module.exports = {
4594
- version: '2.25.1',
4686
+ version: '2.26.0',
4595
4687
  endpoint: 'api.rollbar.com/api/1/item/',
4596
4688
  logLevel: 'debug',
4597
4689
  reportLevel: 'debug',
@@ -4602,7 +4694,7 @@ module.exports = {
4602
4694
 
4603
4695
 
4604
4696
  /***/ }),
4605
- /* 28 */
4697
+ /* 30 */
4606
4698
  /***/ (function(module, exports, __webpack_require__) {
4607
4699
 
4608
4700
  "use strict";
@@ -4670,7 +4762,7 @@ module.exports = {
4670
4762
 
4671
4763
 
4672
4764
  /***/ }),
4673
- /* 29 */
4765
+ /* 31 */
4674
4766
  /***/ (function(module, exports, __webpack_require__) {
4675
4767
 
4676
4768
  "use strict";
@@ -4856,16 +4948,17 @@ module.exports = Telemeter;
4856
4948
 
4857
4949
 
4858
4950
  /***/ }),
4859
- /* 30 */
4951
+ /* 32 */
4860
4952
  /***/ (function(module, exports, __webpack_require__) {
4861
4953
 
4862
4954
  "use strict";
4863
4955
 
4864
4956
 
4865
4957
  var _ = __webpack_require__(0);
4958
+ var headers = __webpack_require__(33);
4866
4959
  var scrub = __webpack_require__(4);
4867
4960
  var urlparser = __webpack_require__(2);
4868
- var domUtil = __webpack_require__(31);
4961
+ var domUtil = __webpack_require__(34);
4869
4962
 
4870
4963
  var defaults = {
4871
4964
  network: true,
@@ -5226,7 +5319,7 @@ Instrumenter.prototype.instrumentNetwork = function() {
5226
5319
  if (args[1] && args[1].headers) {
5227
5320
  // Argument may be a Headers object, or plain object. Ensure here that
5228
5321
  // we are working with a Headers object with case-insensitive keys.
5229
- var reqHeaders = new Headers(args[1].headers);
5322
+ var reqHeaders = headers(args[1].headers);
5230
5323
 
5231
5324
  metadata.request_content_type = reqHeaders.get('Content-Type');
5232
5325
 
@@ -5246,6 +5339,9 @@ Instrumenter.prototype.instrumentNetwork = function() {
5246
5339
  if (self.trackHttpErrors()) {
5247
5340
  metadata.stack = (new Error()).stack;
5248
5341
  }
5342
+
5343
+ // Start our handler before returning the promise. This allows resp.clone()
5344
+ // to execute before other handlers touch the response.
5249
5345
  return orig.apply(this, args).then(function (resp) {
5250
5346
  metadata.end_time_ms = _.now();
5251
5347
  metadata.status_code = resp.status;
@@ -5258,6 +5354,7 @@ Instrumenter.prototype.instrumentNetwork = function() {
5258
5354
  if (self.autoInstrument.networkResponseBody) {
5259
5355
  if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms
5260
5356
  // The response must be cloned to prevent reading (and locking) the original stream.
5357
+ // This must be done before other handlers touch the response.
5261
5358
  body = resp.clone().text(); //returns a Promise
5262
5359
  }
5263
5360
  }
@@ -5633,7 +5730,110 @@ module.exports = Instrumenter;
5633
5730
 
5634
5731
 
5635
5732
  /***/ }),
5636
- /* 31 */
5733
+ /* 33 */
5734
+ /***/ (function(module, exports, __webpack_require__) {
5735
+
5736
+ "use strict";
5737
+
5738
+
5739
+ /*
5740
+ * headers - Detect when fetch Headers are undefined and use a partial polyfill.
5741
+ *
5742
+ * A full polyfill is not used in order to keep package size as small as possible.
5743
+ * Since this is only used internally and is not added to the window object,
5744
+ * the full interface doesn't need to be supported.
5745
+ *
5746
+ * This implementation is modified from whatwg-fetch:
5747
+ * https://github.com/github/fetch
5748
+ */
5749
+ function headers(headers) {
5750
+ if (typeof Headers === 'undefined') {
5751
+ return new FetchHeaders(headers);
5752
+ }
5753
+
5754
+ return new Headers(headers);
5755
+ }
5756
+
5757
+ function normalizeName(name) {
5758
+ if (typeof name !== 'string') {
5759
+ name = String(name)
5760
+ }
5761
+ return name.toLowerCase()
5762
+ }
5763
+
5764
+ function normalizeValue(value) {
5765
+ if (typeof value !== 'string') {
5766
+ value = String(value)
5767
+ }
5768
+ return value
5769
+ }
5770
+
5771
+ function iteratorFor(items) {
5772
+ var iterator = {
5773
+ next: function() {
5774
+ var value = items.shift()
5775
+ return {done: value === undefined, value: value}
5776
+ }
5777
+ }
5778
+
5779
+ return iterator
5780
+ }
5781
+
5782
+ function FetchHeaders(headers) {
5783
+ this.map = {}
5784
+
5785
+ if (headers instanceof FetchHeaders) {
5786
+ headers.forEach(function(value, name) {
5787
+ this.append(name, value)
5788
+ }, this)
5789
+ } else if (Array.isArray(headers)) {
5790
+ headers.forEach(function(header) {
5791
+ this.append(header[0], header[1])
5792
+ }, this)
5793
+ } else if (headers) {
5794
+ Object.getOwnPropertyNames(headers).forEach(function(name) {
5795
+ this.append(name, headers[name])
5796
+ }, this)
5797
+ }
5798
+ }
5799
+
5800
+ FetchHeaders.prototype.append = function(name, value) {
5801
+ name = normalizeName(name)
5802
+ value = normalizeValue(value)
5803
+ var oldValue = this.map[name]
5804
+ this.map[name] = oldValue ? oldValue + ', ' + value : value
5805
+ }
5806
+
5807
+ FetchHeaders.prototype.get = function(name) {
5808
+ name = normalizeName(name)
5809
+ return this.has(name) ? this.map[name] : null
5810
+ }
5811
+
5812
+ FetchHeaders.prototype.has = function(name) {
5813
+ return this.map.hasOwnProperty(normalizeName(name))
5814
+ }
5815
+
5816
+ FetchHeaders.prototype.forEach = function(callback, thisArg) {
5817
+ for (var name in this.map) {
5818
+ if (this.map.hasOwnProperty(name)) {
5819
+ callback.call(thisArg, this.map[name], name, this)
5820
+ }
5821
+ }
5822
+ }
5823
+
5824
+ FetchHeaders.prototype.entries = function() {
5825
+ var items = []
5826
+ this.forEach(function(value, name) {
5827
+ items.push([name, value])
5828
+ })
5829
+ return iteratorFor(items)
5830
+ }
5831
+
5832
+ module.exports = headers;
5833
+
5834
+
5835
+ /***/ }),
5836
+ /* 34 */
5637
5837
  /***/ (function(module, exports, __webpack_require__) {
5638
5838
 
5639
5839
  "use strict";
@@ -5772,19 +5972,19 @@ module.exports = {
5772
5972
 
5773
5973
 
5774
5974
  /***/ }),
5775
- /* 32 */
5975
+ /* 35 */
5776
5976
  /***/ (function(module, exports, __webpack_require__) {
5777
5977
 
5778
5978
  "use strict";
5779
5979
 
5780
5980
 
5781
- var polyfillJSON = __webpack_require__(33);
5981
+ var polyfillJSON = __webpack_require__(36);
5782
5982
 
5783
5983
  module.exports = polyfillJSON;
5784
5984
 
5785
5985
 
5786
5986
  /***/ }),
5787
- /* 33 */
5987
+ /* 36 */
5788
5988
  /***/ (function(module, exports) {
5789
5989
 
5790
5990
  // json3.js
@@ -6553,7 +6753,7 @@ module.exports = setupCustomJSON;
6553
6753
 
6554
6754
 
6555
6755
  /***/ }),
6556
- /* 34 */
6756
+ /* 37 */
6557
6757
  /***/ (function(module, exports, __webpack_require__) {
6558
6758
 
6559
6759
  "use strict";
@@ -6603,7 +6803,7 @@ module.exports = wrapGlobals;
6603
6803
 
6604
6804
 
6605
6805
  /***/ }),
6606
- /* 35 */
6806
+ /* 38 */
6607
6807
  /***/ (function(module, exports, __webpack_require__) {
6608
6808
 
6609
6809
  "use strict";