@arms/rum-core 0.0.2 → 0.0.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.
@@ -88,7 +88,7 @@ export interface IConfiguration {
88
88
  */
89
89
  endpoint: string;
90
90
  /**
91
- * repoter 发送事件之前
91
+ * reporter 发送事件之前
92
92
  */
93
93
  beforeReport?(bundle: RumEventBundle): any;
94
94
  /**
package/lib/utils/is.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ export type IsFnHelper<T = unknown> = (value: unknown) => value is T;
2
+ export declare function isTypeof<T = unknown>(value: unknown, type: string): value is T;
1
3
  export declare const isFunction: (func: any) => boolean;
2
- export declare const isArray: (arr: any) => boolean;
4
+ export declare const isUndefined: IsFnHelper<undefined>;
package/lib/utils/is.js CHANGED
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.isFunction = exports.isArray = void 0;
4
+ exports.isFunction = void 0;
5
+ exports.isTypeof = isTypeof;
6
+ exports.isUndefined = void 0;
7
+ function isTypeof(value, type) {
8
+ return typeof value === type;
9
+ }
5
10
  var isFunction = exports.isFunction = function isFunction(func) {
6
11
  return typeof func === 'function';
7
12
  };
8
- var isArray = exports.isArray = function isArray(arr) {
9
- return Array.isArray(arr);
13
+ var isUndefined = exports.isUndefined = function isUndefined(value) {
14
+ return isTypeof(value, 'undefined');
10
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arms/rum-core",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "arms rum javascript sdk core",
5
5
  "author": "guangli.fj <guangli.fj@alibaba-inc.com>",
6
6
  "license": "ISC",