@arms/rum-core 0.0.1 → 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.
- package/lib/types/client.d.ts +1 -1
- package/lib/utils/is.d.ts +3 -1
- package/lib/utils/is.js +8 -3
- package/package.json +1 -2
package/lib/types/client.d.ts
CHANGED
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
|
|
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 =
|
|
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
|
|
9
|
-
return
|
|
13
|
+
var isUndefined = exports.isUndefined = function isUndefined(value) {
|
|
14
|
+
return isTypeof(value, 'undefined');
|
|
10
15
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arms/rum-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "arms rum javascript sdk core",
|
|
5
5
|
"author": "guangli.fj <guangli.fj@alibaba-inc.com>",
|
|
6
|
-
"homepage": "https://unpkg.com/@arms/rum-core@0.0.1/build/index.html",
|
|
7
6
|
"license": "ISC",
|
|
8
7
|
"main": "lib/index.js",
|
|
9
8
|
"directories": {
|