utils-lib-js 2.3.2 → 2.3.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/dist/bundle/base.d.ts +2 -3
- package/dist/bundle/index.d.ts +1 -16
- package/dist/bundle/index.js +1 -97
- package/dist/bundle/static.d.ts +1 -0
- package/dist/bundle/types.d.ts +2 -1
- package/dist/cjs/base.d.ts +2 -3
- package/dist/cjs/index.d.ts +1 -16
- package/dist/cjs/index.js +1 -97
- package/dist/cjs/static.d.ts +1 -0
- package/dist/cjs/types.d.ts +2 -1
- package/dist/esm/base.d.ts +2 -3
- package/dist/esm/index.d.ts +1 -16
- package/dist/esm/index.js +1 -97
- package/dist/esm/static.d.ts +1 -0
- package/dist/esm/types.d.ts +2 -1
- package/dist/umd/base.d.ts +2 -3
- package/dist/umd/index.d.ts +1 -16
- package/dist/umd/index.js +1 -97
- package/dist/umd/static.d.ts +1 -0
- package/dist/umd/types.d.ts +2 -1
- package/package.json +53 -51
package/dist/umd/static.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare enum types {
|
|
|
10
10
|
"[object RegExp]" = "regExp",
|
|
11
11
|
"[object Math]" = "math"
|
|
12
12
|
}
|
|
13
|
+
export type GetTypesReturn = "array" | "object" | "function" | "set" | "map" | "weakMap" | "weakSet" | "date" | "regExp" | "math" | "string" | "number" | "boolean" | "symbol" | "bigint" | "undefined" | "null";
|
|
13
14
|
declare const _default: {
|
|
14
15
|
types: typeof types;
|
|
15
16
|
};
|
package/dist/umd/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GetTypesReturn } from "./static";
|
|
1
2
|
export type IKey = string | symbol | number;
|
|
2
3
|
export type IObject<V = any, K extends string | number | symbol = IKey> = Record<K, V>;
|
|
3
4
|
export interface IPromise<T = any> {
|
|
@@ -12,7 +13,7 @@ export type IDemoteArray<T> = Array<IDemoteArray<T> | T>;
|
|
|
12
13
|
export type IRandomNum = (min: number, max: number, bool?: boolean) => number;
|
|
13
14
|
export type IUrlSplit = (url: string) => IObject<any>;
|
|
14
15
|
export type IUrlJoin = (url: string, query: IObject) => string;
|
|
15
|
-
export type IGetType
|
|
16
|
+
export type IGetType = (data: any) => GetTypesReturn;
|
|
16
17
|
export type IGetTypeByList = (data: any, whiteList: string[]) => boolean;
|
|
17
18
|
export type IGetValue = <T, U = IObject<T> | IObject<T>[IKey]>(object: U, key: string, defaultValue?: any) => U;
|
|
18
19
|
export type ISetValue = <T>(object: IObject<T>, key: string, value?: any) => IObject<T>;
|
package/package.json
CHANGED
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "utils-lib-js",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "JavaScript工具函数,封装的一些常用的js函数",
|
|
5
|
-
"main": "./dist/cjs/index.js",
|
|
6
|
-
"types": "./dist/cjs/index.d.ts",
|
|
7
|
-
"module": "./dist/esm/index.js",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"exports": {
|
|
10
|
-
"import": "./dist/esm/index.js",
|
|
11
|
-
"require": "./dist/cjs/index.js"
|
|
12
|
-
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
},
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "utils-lib-js",
|
|
3
|
+
"version": "2.3.3",
|
|
4
|
+
"description": "JavaScript工具函数,封装的一些常用的js函数",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"types": "./dist/cjs/index.d.ts",
|
|
7
|
+
"module": "./dist/esm/index.js",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": "./dist/esm/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://gitee.com/DieHunter/utils-lib-js.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"utils",
|
|
19
|
+
"tools",
|
|
20
|
+
"lib"
|
|
21
|
+
],
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@rollup/plugin-alias": "^4.0.3",
|
|
26
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
27
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
28
|
+
"@types/node": "^18.7.15",
|
|
29
|
+
"ncp": "^2.0.0",
|
|
30
|
+
"rimraf": "^6.1.3",
|
|
31
|
+
"rollup": "^3.20.2",
|
|
32
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
33
|
+
"tslib": "^2.5.0",
|
|
34
|
+
"typescript": "^4.9.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"event-message-center": "^1.4.0",
|
|
38
|
+
"js-log-lib": "^1.1.2",
|
|
39
|
+
"js-request-lib": "^1.0.10",
|
|
40
|
+
"task-queue-lib": "^1.4.2",
|
|
41
|
+
"timer-manager-lib": "^1.0.0"
|
|
42
|
+
},
|
|
43
|
+
"umdModuleName": "UtilsLib",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"debug": "start cmd /k pnpm run build:hot & pnpm run node:hot",
|
|
46
|
+
"node:hot": "nodemon example.js --watch example.js",
|
|
47
|
+
"build:hot": "pnpm rollup -c --watch",
|
|
48
|
+
"build": "pnpm run rollup:build && pnpm run commonjs",
|
|
49
|
+
"rollup:build": "rimraf dist && pnpm rollup -c",
|
|
50
|
+
"build:publish": "pnpm run build && pnpm publish",
|
|
51
|
+
"commonjs": "ncp ./commonjs.json dist/cjs/package.json"
|
|
52
|
+
}
|
|
53
|
+
}
|