@microsoft/applicationinsights-core-js 2.7.3 → 2.7.4-nightly.2202-03

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.
Files changed (56) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +158 -118
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +39 -4
  7. package/dist/applicationinsights-core-js.api.md +1 -1
  8. package/dist/applicationinsights-core-js.d.ts +2 -2
  9. package/dist/applicationinsights-core-js.js +158 -118
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +2 -2
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +1 -1
  16. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  17. package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
  18. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  19. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  20. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  21. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  22. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  23. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  24. package/dist-esm/JavaScriptSDK/HelperFuncs.js +291 -108
  25. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  26. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +2 -35
  27. package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
  28. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  29. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  30. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  31. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  32. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  33. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +1 -1
  34. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  35. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  36. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  37. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  38. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  39. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  40. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  41. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  42. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  43. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  44. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  52. package/dist-esm/applicationinsights-core-js.js +1 -1
  53. package/package.json +70 -67
  54. package/src/JavaScriptSDK/HelperFuncs.ts +329 -108
  55. package/src/JavaScriptSDK/InstrumentHooks.ts +1 -41
  56. package/types/JavaScriptSDK/HelperFuncs.d.ts +40 -1
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
3
+ * @ignore
4
+ */
5
+ export declare function _getObjProto(target: any): any;
1
6
  export declare function objToString(obj: any): any;
2
7
  export declare function isTypeof(value: any, theType: string): boolean;
3
8
  export declare function isUndefined(value: any): boolean;
@@ -46,6 +51,13 @@ export declare function objForEachKey(target: any, callbackfn: (name: string, va
46
51
  * @returns true if the given search value is found at the end of the string, otherwise false.
47
52
  */
48
53
  export declare function strEndsWith(value: string, search: string): boolean;
54
+ /**
55
+ * The _strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
56
+ * @param value - The value to check whether it ends with the search value.
57
+ * @param search - The characters to be searched for at the end of the value.
58
+ * @returns true if the given search value is found at the end of the string, otherwise false.
59
+ */
60
+ export declare function _strEndsWithPoly(value: string, search: string): boolean;
49
61
  /**
50
62
  * The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
51
63
  * @param value - The value to check whether it ends with the search value.
@@ -53,6 +65,13 @@ export declare function strEndsWith(value: string, search: string): boolean;
53
65
  * @returns true if the given search value is found at the start of the string, otherwise false.
54
66
  */
55
67
  export declare function strStartsWith(value: string, checkValue: string): boolean;
68
+ /**
69
+ * The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
70
+ * @param value - The value to check whether it ends with the search value.
71
+ * @param checkValue - The characters to be searched for at the start of the value.
72
+ * @returns true if the given search value is found at the start of the string, otherwise false.
73
+ */
74
+ export declare function _strStartsWithPoly(value: string, checkValue: string): boolean;
56
75
  /**
57
76
  * A simple wrapper (for minification support) to check if the value contains the search string.
58
77
  * @param value - The string value to check for the existence of the search value
@@ -66,7 +85,7 @@ export declare function isDate(obj: any): obj is Date;
66
85
  /**
67
86
  * Check if an object is of type Array
68
87
  */
69
- export declare function isArray(obj: any): boolean;
88
+ export declare function isArray<T = any>(obj: any): obj is Array<T>;
70
89
  /**
71
90
  * Check if an object is of type Error
72
91
  */
@@ -96,10 +115,19 @@ export declare function isBoolean(value: any): value is boolean;
96
115
  * @return {boolean} True if the value is a Symbol, false otherwise.
97
116
  */
98
117
  export declare function isSymbol(value: any): boolean;
118
+ /**
119
+ * Checks if the type of the value is a normal plain object (not a null or data)
120
+ * @param value
121
+ */
122
+ export declare function isPlainObject(value: any): boolean;
99
123
  /**
100
124
  * Convert a date to I.S.O. format in IE8
101
125
  */
102
126
  export declare function toISOString(date: Date): string;
127
+ /**
128
+ * Convert a date to I.S.O. format in IE8
129
+ */
130
+ export declare function _toISOStringPoly(date: Date): string;
103
131
  /**
104
132
  * Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
105
133
  * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
@@ -221,3 +249,14 @@ export declare function createClassFromInterface<T>(defaults?: T): new () => T;
221
249
  * @param theObject - The object to be optimized if possible
222
250
  */
223
251
  export declare function optimizeObject<T>(theObject: T): T;
252
+ /**
253
+ * Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
254
+ * It will NOT merge inherited or non-enumerable properties.
255
+ * @param obj1 - object to merge. Set this argument to 'true' for a deep extend.
256
+ * @param obj2 - object to merge.
257
+ * @param obj3 - object to merge.
258
+ * @param obj4 - object to merge.
259
+ * @param obj5 - object to merge.
260
+ * @returns The extended first object.
261
+ */
262
+ export declare function objExtend<T1, T2, T3, T4, T5, T6>(obj?: boolean | T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;