@microsoft/applicationinsights-react-js 3.2.3-nightly.2112-07 → 3.2.3

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - React Plugin, 3.2.3-nightly.2112-07
2
+ * Application Insights JavaScript SDK - React Plugin, 3.2.3
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -43,20 +43,24 @@
43
43
  var ObjDefineProperty = ObjClass["defineProperty"];
44
44
  var ObjHasOwnProperty = ObjProto[strShimHasOwnProperty];
45
45
 
46
- function getGlobal() {
47
- if (typeof globalThis !== strShimUndefined && globalThis) {
48
- return globalThis;
49
- }
50
- if (typeof self !== strShimUndefined && self) {
51
- return self;
52
- }
53
- if (typeof window !== strShimUndefined && window) {
54
- return window;
55
- }
56
- if (typeof global !== strShimUndefined && global) {
57
- return global;
46
+ var _cachedGlobal = null;
47
+ function getGlobal(useCached) {
48
+ if (useCached === void 0) { useCached = true; }
49
+ if (!_cachedGlobal || !useCached) {
50
+ if (typeof globalThis !== strShimUndefined && globalThis) {
51
+ _cachedGlobal = globalThis;
52
+ }
53
+ if (typeof self !== strShimUndefined && self) {
54
+ _cachedGlobal = self;
55
+ }
56
+ if (typeof window !== strShimUndefined && window) {
57
+ _cachedGlobal = window;
58
+ }
59
+ if (typeof global !== strShimUndefined && global) {
60
+ _cachedGlobal = global;
61
+ }
58
62
  }
59
- return null;
63
+ return _cachedGlobal;
60
64
  }
61
65
  function throwTypeError(message) {
62
66
  throw new TypeError(message);
@@ -447,6 +451,7 @@
447
451
  var strOnPrefix = "on";
448
452
  var strAttachEvent = "attachEvent";
449
453
  var strAddEventHelper = "addEventListener";
454
+ var strToISOString = "toISOString";
450
455
  var _objDefineProperty = ObjDefineProperty;
451
456
  function objToString(obj) {
452
457
  return ObjProto.toString.call(obj);
@@ -545,22 +550,27 @@
545
550
  return typeof value === "boolean";
546
551
  }
547
552
  function toISOString(date) {
548
- if (isDate(date)) {
549
- var pad = function (num) {
550
- var r = String(num);
551
- if (r.length === 1) {
552
- r = "0" + r;
553
- }
554
- return r;
555
- };
556
- return date.getUTCFullYear()
557
- + "-" + pad(date.getUTCMonth() + 1)
558
- + "-" + pad(date.getUTCDate())
559
- + "T" + pad(date.getUTCHours())
560
- + ":" + pad(date.getUTCMinutes())
561
- + ":" + pad(date.getUTCSeconds())
562
- + "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
563
- + "Z";
553
+ if (date) {
554
+ if (date[strToISOString]) {
555
+ return date[strToISOString]();
556
+ }
557
+ if (isDate(date)) {
558
+ var pad = function (num) {
559
+ var r = String(num);
560
+ if (r.length === 1) {
561
+ r = "0" + r;
562
+ }
563
+ return r;
564
+ };
565
+ return date.getUTCFullYear()
566
+ + "-" + pad(date.getUTCMonth() + 1)
567
+ + "-" + pad(date.getUTCDate())
568
+ + "T" + pad(date.getUTCHours())
569
+ + ":" + pad(date.getUTCMinutes())
570
+ + ":" + pad(date.getUTCSeconds())
571
+ + "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
572
+ + "Z";
573
+ }
564
574
  }
565
575
  }
566
576
  function arrForEach(arr, callbackfn, thisArg) {