@wzyjs/utils 0.0.26 → 0.0.28
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/browser/cjs/browser/element.js +40 -0
- package/dist/browser/cjs/browser/index.js +20 -0
- package/dist/browser/cjs/browser/other.js +12 -0
- package/dist/browser/cjs/browser/style.js +49 -0
- package/dist/browser/cjs/browser.js +171 -0
- package/dist/browser/cjs/common/classs.js +14 -0
- package/dist/browser/cjs/common/dayjs.js +27 -0
- package/dist/browser/cjs/types/index.d.ts +27 -0
- package/dist/{esm/fe → browser/cjs/utils/src/browser}/index.d.ts +1 -1
- package/dist/browser/cjs/utils/src/browser/other.d.ts +1 -0
- package/dist/browser/cjs/utils/src/browser.d.ts +2 -0
- package/dist/browser/cjs/utils/src/common/classs.d.ts +5 -0
- package/dist/browser/cjs/utils/src/common/dayjs.d.ts +4 -0
- package/dist/browser/cjs/utils/src/common/index.d.ts +11 -0
- package/dist/{cjs/common/tools → browser/cjs/utils/src/common}/other.d.ts +1 -1
- package/dist/{cjs/rd → browser/cjs/utils/src/node}/jsonFile/index.d.ts +1 -1
- package/dist/browser/cjs/utils/src/node.d.ts +2 -0
- package/dist/{esm/fe → browser/esm/browser}/index.js +0 -1
- package/dist/browser/esm/browser/other.js +10 -0
- package/dist/browser/esm/browser.js +19 -0
- package/dist/browser/esm/common/classs.js +12 -0
- package/dist/browser/esm/common/dayjs.js +18 -0
- package/dist/browser/esm/types/index.d.ts +27 -0
- package/dist/{cjs/fe → browser/esm/utils/src/browser}/index.d.ts +1 -1
- package/dist/browser/esm/utils/src/browser/other.d.ts +1 -0
- package/dist/browser/esm/utils/src/browser.d.ts +2 -0
- package/dist/browser/esm/utils/src/common/classs.d.ts +5 -0
- package/dist/browser/esm/utils/src/common/dayjs.d.ts +4 -0
- package/dist/browser/esm/utils/src/common/index.d.ts +11 -0
- package/dist/{esm/common/tools → browser/esm/utils/src/common}/other.d.ts +1 -1
- package/dist/{esm/rd → browser/esm/utils/src/node}/jsonFile/index.d.ts +1 -1
- package/dist/browser/esm/utils/src/node.d.ts +2 -0
- package/dist/node/cjs/common/classs.js +14 -0
- package/dist/node/cjs/common/dayjs.js +27 -0
- package/dist/node/cjs/common/number.js +34 -0
- package/dist/node/cjs/common/object.js +43 -0
- package/dist/node/cjs/common/other.js +112 -0
- package/dist/node/cjs/common/string.js +137 -0
- package/dist/{cjs/index_rd.js → node/cjs/node.js} +28 -8
- package/dist/node/cjs/types/index.d.ts +27 -0
- package/dist/node/cjs/utils/src/browser/element.d.ts +9 -0
- package/dist/node/cjs/utils/src/browser/index.d.ts +18 -0
- package/dist/node/cjs/utils/src/browser/other.d.ts +1 -0
- package/dist/node/cjs/utils/src/browser/style.d.ts +10 -0
- package/dist/node/cjs/utils/src/browser.d.ts +2 -0
- package/dist/node/cjs/utils/src/common/classs.d.ts +5 -0
- package/dist/node/cjs/utils/src/common/dayjs.d.ts +4 -0
- package/dist/node/cjs/utils/src/common/index.d.ts +11 -0
- package/dist/node/cjs/utils/src/common/number.d.ts +3 -0
- package/dist/node/cjs/utils/src/common/object.d.ts +10 -0
- package/dist/node/cjs/utils/src/common/other.d.ts +26 -0
- package/dist/node/cjs/utils/src/common/string.d.ts +16 -0
- package/dist/node/cjs/utils/src/node/database/Collection.d.ts +22 -0
- package/dist/node/cjs/utils/src/node/database/Database.d.ts +10 -0
- package/dist/node/cjs/utils/src/node/database/index.d.ts +2 -0
- package/dist/node/cjs/utils/src/node/database/types.d.ts +151 -0
- package/dist/node/cjs/utils/src/node/database/utils.d.ts +3 -0
- package/dist/node/cjs/utils/src/node/index.d.ts +3 -0
- package/dist/node/cjs/utils/src/node/jsonFile/index.d.ts +6 -0
- package/dist/node/cjs/utils/src/node/mail/index.d.ts +1 -0
- package/dist/node/cjs/utils/src/node.d.ts +2 -0
- package/dist/node/esm/common/classs.js +12 -0
- package/dist/node/esm/common/dayjs.js +18 -0
- package/dist/node/esm/common/number.js +30 -0
- package/dist/node/esm/common/object.js +39 -0
- package/dist/node/esm/common/other.js +106 -0
- package/dist/node/esm/common/string.js +120 -0
- package/dist/node/esm/node/database/Collection.js +200 -0
- package/dist/node/esm/node/database/Database.js +23 -0
- package/dist/node/esm/node/database/types.js +25 -0
- package/dist/node/esm/node/database/utils.js +27 -0
- package/dist/node/esm/node/jsonFile/index.js +27 -0
- package/dist/node/esm/node/mail/index.js +29 -0
- package/dist/node/esm/node.js +14 -0
- package/dist/node/esm/types/index.d.ts +27 -0
- package/dist/node/esm/utils/src/browser/element.d.ts +9 -0
- package/dist/node/esm/utils/src/browser/index.d.ts +18 -0
- package/dist/node/esm/utils/src/browser/other.d.ts +1 -0
- package/dist/node/esm/utils/src/browser/style.d.ts +10 -0
- package/dist/node/esm/utils/src/browser.d.ts +2 -0
- package/dist/node/esm/utils/src/common/classs.d.ts +5 -0
- package/dist/node/esm/utils/src/common/dayjs.d.ts +4 -0
- package/dist/node/esm/utils/src/common/index.d.ts +11 -0
- package/dist/node/esm/utils/src/common/number.d.ts +3 -0
- package/dist/node/esm/utils/src/common/object.d.ts +10 -0
- package/dist/node/esm/utils/src/common/other.d.ts +26 -0
- package/dist/node/esm/utils/src/common/string.d.ts +16 -0
- package/dist/node/esm/utils/src/node/database/Collection.d.ts +22 -0
- package/dist/node/esm/utils/src/node/database/Database.d.ts +10 -0
- package/dist/node/esm/utils/src/node/database/index.d.ts +2 -0
- package/dist/node/esm/utils/src/node/database/types.d.ts +151 -0
- package/dist/node/esm/utils/src/node/database/utils.d.ts +3 -0
- package/dist/node/esm/utils/src/node/index.d.ts +3 -0
- package/dist/node/esm/utils/src/node/jsonFile/index.d.ts +6 -0
- package/dist/node/esm/utils/src/node/mail/index.d.ts +1 -0
- package/dist/node/esm/utils/src/node.d.ts +2 -0
- package/package.json +23 -11
- package/dist/cjs/common/index.d.ts +0 -6
- package/dist/cjs/common/tools/index.d.ts +0 -4
- package/dist/cjs/common/types/index.d.ts +0 -15
- package/dist/cjs/fe/dayjs.d.ts +0 -2
- package/dist/cjs/index_all.d.ts +0 -3
- package/dist/cjs/index_fe.d.ts +0 -2
- package/dist/cjs/index_rd.d.ts +0 -2
- package/dist/esm/common/index.d.ts +0 -6
- package/dist/esm/common/tools/index.d.ts +0 -4
- package/dist/esm/common/types/index.d.ts +0 -15
- package/dist/esm/fe/dayjs.d.ts +0 -2
- package/dist/esm/fe/dayjs.js +0 -9
- package/dist/esm/index_all.d.ts +0 -3
- package/dist/esm/index_fe.d.ts +0 -2
- package/dist/esm/index_fe.js +0 -16
- package/dist/esm/index_rd.d.ts +0 -2
- /package/dist/{cjs/common/tools → browser/cjs/common}/number.js +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/common}/object.js +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/common}/other.js +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/common}/string.js +0 -0
- /package/dist/{cjs/fe → browser/cjs/utils/src/browser}/element.d.ts +0 -0
- /package/dist/{cjs/fe → browser/cjs/utils/src/browser}/style.d.ts +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/utils/src/common}/number.d.ts +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/utils/src/common}/object.d.ts +0 -0
- /package/dist/{cjs/common/tools → browser/cjs/utils/src/common}/string.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/database/Collection.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/database/Database.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/database/index.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/database/types.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/database/utils.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/index.d.ts +0 -0
- /package/dist/{cjs/rd → browser/cjs/utils/src/node}/mail/index.d.ts +0 -0
- /package/dist/{esm/fe → browser/esm/browser}/element.js +0 -0
- /package/dist/{esm/fe → browser/esm/browser}/style.js +0 -0
- /package/dist/{esm/common/tools → browser/esm/common}/number.js +0 -0
- /package/dist/{esm/common/tools → browser/esm/common}/object.js +0 -0
- /package/dist/{esm/common/tools → browser/esm/common}/other.js +0 -0
- /package/dist/{esm/common/tools → browser/esm/common}/string.js +0 -0
- /package/dist/{esm/fe → browser/esm/utils/src/browser}/element.d.ts +0 -0
- /package/dist/{esm/fe → browser/esm/utils/src/browser}/style.d.ts +0 -0
- /package/dist/{esm/common/tools → browser/esm/utils/src/common}/number.d.ts +0 -0
- /package/dist/{esm/common/tools → browser/esm/utils/src/common}/object.d.ts +0 -0
- /package/dist/{esm/common/tools → browser/esm/utils/src/common}/string.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/database/Collection.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/database/Database.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/database/index.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/database/types.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/database/utils.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/index.d.ts +0 -0
- /package/dist/{esm/rd → browser/esm/utils/src/node}/mail/index.d.ts +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/database/Collection.js +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/database/Database.js +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/database/types.js +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/database/utils.js +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/jsonFile/index.js +0 -0
- /package/dist/{cjs/rd → node/cjs/node}/mail/index.js +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { Database, ICountRes } from '@cloudbase/node-sdk';
|
|
2
|
+
export interface Config {
|
|
3
|
+
env: string;
|
|
4
|
+
secretId: string;
|
|
5
|
+
secretKey: string;
|
|
6
|
+
}
|
|
7
|
+
export type IdConditions = {
|
|
8
|
+
_id: string;
|
|
9
|
+
field?: string[] | {
|
|
10
|
+
[key: string]: false;
|
|
11
|
+
};
|
|
12
|
+
options?: {
|
|
13
|
+
timeout: number;
|
|
14
|
+
multiple?: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare enum Command {
|
|
18
|
+
Eq = "eq",
|
|
19
|
+
Neq = "neq",
|
|
20
|
+
Lt = "lt",
|
|
21
|
+
Lte = "lte",
|
|
22
|
+
Gt = "gt",
|
|
23
|
+
Gte = "gte",
|
|
24
|
+
In = "in",
|
|
25
|
+
Nin = "nin",
|
|
26
|
+
Gtlt = "gtlt"
|
|
27
|
+
}
|
|
28
|
+
export type CommandWhere = {
|
|
29
|
+
type: Command.Eq;
|
|
30
|
+
value: any;
|
|
31
|
+
} | {
|
|
32
|
+
type: Command.Neq;
|
|
33
|
+
value: any;
|
|
34
|
+
} | {
|
|
35
|
+
type: Command.Gt;
|
|
36
|
+
value: number;
|
|
37
|
+
} | {
|
|
38
|
+
type: Command.Gte;
|
|
39
|
+
value: number;
|
|
40
|
+
} | {
|
|
41
|
+
type: Command.Lt;
|
|
42
|
+
value: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: Command.Lte;
|
|
45
|
+
value: number;
|
|
46
|
+
} | {
|
|
47
|
+
type: Command.Gtlt;
|
|
48
|
+
value: number[];
|
|
49
|
+
} | {
|
|
50
|
+
type: Command.In;
|
|
51
|
+
value: any[];
|
|
52
|
+
} | {
|
|
53
|
+
type: Command.Nin;
|
|
54
|
+
value: any[];
|
|
55
|
+
};
|
|
56
|
+
export type WhereConditions = {
|
|
57
|
+
where?: {
|
|
58
|
+
[key: string]: any | CommandWhere;
|
|
59
|
+
};
|
|
60
|
+
field?: string[] | {
|
|
61
|
+
[key: string]: false;
|
|
62
|
+
};
|
|
63
|
+
page?: {
|
|
64
|
+
size?: number;
|
|
65
|
+
current?: number;
|
|
66
|
+
};
|
|
67
|
+
order?: {
|
|
68
|
+
field: string;
|
|
69
|
+
type?: 'asc' | 'desc';
|
|
70
|
+
};
|
|
71
|
+
options?: {
|
|
72
|
+
timeout?: number;
|
|
73
|
+
multiple?: boolean;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export type Conditions = IdConditions | WhereConditions;
|
|
77
|
+
export declare enum Method {
|
|
78
|
+
Add = "add",
|
|
79
|
+
Find = "find",
|
|
80
|
+
FindList = "findList",
|
|
81
|
+
Delete = "delete",
|
|
82
|
+
Update = "update",
|
|
83
|
+
Count = "count"
|
|
84
|
+
}
|
|
85
|
+
export declare namespace Add {
|
|
86
|
+
type Params<D> = {
|
|
87
|
+
method: Method.Add;
|
|
88
|
+
data: D;
|
|
89
|
+
conditions?: Pick<IdConditions, 'field'>;
|
|
90
|
+
isReturn?: true;
|
|
91
|
+
};
|
|
92
|
+
type Res = {
|
|
93
|
+
id: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export declare namespace Find {
|
|
97
|
+
type Params = {
|
|
98
|
+
method: Method.Find;
|
|
99
|
+
conditions?: Conditions;
|
|
100
|
+
};
|
|
101
|
+
type Res<D> = Record<D> | undefined;
|
|
102
|
+
}
|
|
103
|
+
export declare namespace FindList {
|
|
104
|
+
type Params = {
|
|
105
|
+
method: Method.FindList;
|
|
106
|
+
conditions?: WhereConditions;
|
|
107
|
+
};
|
|
108
|
+
type Res<D> = {
|
|
109
|
+
list?: Record<D>[];
|
|
110
|
+
total?: number;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export declare namespace Delete {
|
|
114
|
+
type Params = {
|
|
115
|
+
method: Method.Delete;
|
|
116
|
+
conditions: Conditions;
|
|
117
|
+
};
|
|
118
|
+
type Res = {
|
|
119
|
+
deleted: number | string;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export declare namespace Update {
|
|
123
|
+
type Params<D> = {
|
|
124
|
+
method: Method.Update;
|
|
125
|
+
conditions: Conditions;
|
|
126
|
+
data: Partial<Record<D>>;
|
|
127
|
+
isReturn?: true;
|
|
128
|
+
isSet?: true;
|
|
129
|
+
};
|
|
130
|
+
type Res<D> = {
|
|
131
|
+
updated?: number;
|
|
132
|
+
doc?: D;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export declare namespace Count {
|
|
136
|
+
type Params = {
|
|
137
|
+
method: Method.Count;
|
|
138
|
+
conditions?: WhereConditions;
|
|
139
|
+
};
|
|
140
|
+
type Res = {
|
|
141
|
+
total?: number;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export type MethodParams<D> = Add.Params<D> | Find.Params | FindList.Params | Delete.Params | Update.Params<D> | Count.Params;
|
|
145
|
+
export type MethodRes<D> = Add.Res | Find.Res<D> | FindList.Res<D> | Delete.Res | Update.Res<D> | Count.Res;
|
|
146
|
+
export type IRes = Database.IAddRes | Database.IGetRes | Database.IDeleteResult | Database.IUpdateResult | ICountRes;
|
|
147
|
+
export type Record<D> = D & {
|
|
148
|
+
_id: string;
|
|
149
|
+
createAt: number;
|
|
150
|
+
updateAt: number;
|
|
151
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sendMail: (toEmail: string, title: string, content?: string) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wzyjs/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"description": "description",
|
|
5
5
|
"author": "wzy",
|
|
6
6
|
"license": "ISC",
|
|
7
|
-
"main": "dist/cjs/index_rd.js",
|
|
8
|
-
"module": "dist/esm/index_fe.js",
|
|
9
|
-
"typings": "dist/esm/index_all.d.ts",
|
|
10
7
|
"exports": {
|
|
11
8
|
".": {
|
|
12
|
-
"import": "./dist/esm/
|
|
13
|
-
"require": "./dist/cjs/
|
|
9
|
+
"import": "./dist/browser/esm/browser.js",
|
|
10
|
+
"require": "./dist/browser/cjs/browser.js"
|
|
14
11
|
},
|
|
15
|
-
"./
|
|
12
|
+
"./node": {
|
|
13
|
+
"import": "./dist/node/esm/node.js",
|
|
14
|
+
"require": "./dist/node/cjs/node.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"typesVersions": {
|
|
18
|
+
"*": {
|
|
19
|
+
"*": [
|
|
20
|
+
"./dist/browser/esm/utils/src/browser.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"node": [
|
|
23
|
+
"./dist/node/esm/utils/src/node.d.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
16
26
|
},
|
|
17
27
|
"scripts": {
|
|
18
28
|
"dev": "rollup -c -w --bundleConfigAsCjs",
|
|
@@ -23,8 +33,6 @@
|
|
|
23
33
|
],
|
|
24
34
|
"dependencies": {
|
|
25
35
|
"@cloudbase/node-sdk": "^2.9.1",
|
|
26
|
-
"@types/animejs": "^3.1.6",
|
|
27
|
-
"@types/nodemailer": "^6.4.7",
|
|
28
36
|
"animejs": "^3.2.1",
|
|
29
37
|
"classnames": "^2.3.2",
|
|
30
38
|
"consola": "^2.15.3",
|
|
@@ -34,14 +42,18 @@
|
|
|
34
42
|
"lodash": "^4.17.21",
|
|
35
43
|
"md5": "^2.3.0",
|
|
36
44
|
"nodemailer": "^6.9.1",
|
|
37
|
-
"tslib": "^2.4.1"
|
|
45
|
+
"tslib": "^2.4.1",
|
|
46
|
+
"zod": "^3.21.4"
|
|
38
47
|
},
|
|
39
48
|
"devDependencies": {
|
|
40
49
|
"@rollup/plugin-commonjs": "^23.0.3",
|
|
41
50
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
51
|
+
"@types/animejs": "^3.1.6",
|
|
42
52
|
"@types/lodash": "^4.14.189",
|
|
43
53
|
"@types/md5": "^2.3.2",
|
|
44
54
|
"@types/node": "^18.11.11",
|
|
55
|
+
"@types/nodemailer": "^6.4.7",
|
|
56
|
+
"@wzyjs/types": "^0.0.28",
|
|
45
57
|
"rollup": "^3.6.0",
|
|
46
58
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
47
59
|
"typescript": "^4.9.3"
|
|
@@ -53,5 +65,5 @@
|
|
|
53
65
|
"type": "git",
|
|
54
66
|
"url": "https://gitee.com/wang-zhenyu/app.git"
|
|
55
67
|
},
|
|
56
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "b27e8d285e4092485cd1be538c1f571bc29e7835"
|
|
57
69
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { cloneDeep, debounce, isBoolean, isEqual, isFunction, isNumber, isObject, isString, merge, omit, pick, uniq, uniqBy, uniqWith, isEmpty, isError, find, groupBy } from 'lodash';
|
|
2
|
-
export { cloneDeep, debounce, isBoolean, isEqual, isFunction, isNumber, isObject, isString, merge, omit, pick, uniq, uniqBy, uniqWith, isEmpty, isError, find, groupBy };
|
|
3
|
-
export * as consola from 'consola';
|
|
4
|
-
export * from './tools';
|
|
5
|
-
export * from './types';
|
|
6
|
-
export { default as lodash } from 'lodash';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RequestRes<D = any> {
|
|
2
|
-
success?: boolean;
|
|
3
|
-
message?: string;
|
|
4
|
-
data?: D;
|
|
5
|
-
}
|
|
6
|
-
export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>;
|
|
7
|
-
export interface Pagination {
|
|
8
|
-
current?: number;
|
|
9
|
-
pageSize?: number;
|
|
10
|
-
}
|
|
11
|
-
export type SortParams<D extends object | string = string> = Record<D extends string ? string : keyof D, 'ascend' | 'descend'>;
|
|
12
|
-
export type OrderParams<D extends object | string = string> = {
|
|
13
|
-
field: D extends string ? string : keyof D;
|
|
14
|
-
type: 'asc' | 'desc';
|
|
15
|
-
};
|
package/dist/cjs/fe/dayjs.d.ts
DELETED
package/dist/cjs/index_all.d.ts
DELETED
package/dist/cjs/index_fe.d.ts
DELETED
package/dist/cjs/index_rd.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { cloneDeep, debounce, isBoolean, isEqual, isFunction, isNumber, isObject, isString, merge, omit, pick, uniq, uniqBy, uniqWith, isEmpty, isError, find, groupBy } from 'lodash';
|
|
2
|
-
export { cloneDeep, debounce, isBoolean, isEqual, isFunction, isNumber, isObject, isString, merge, omit, pick, uniq, uniqBy, uniqWith, isEmpty, isError, find, groupBy };
|
|
3
|
-
export * as consola from 'consola';
|
|
4
|
-
export * from './tools';
|
|
5
|
-
export * from './types';
|
|
6
|
-
export { default as lodash } from 'lodash';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RequestRes<D = any> {
|
|
2
|
-
success?: boolean;
|
|
3
|
-
message?: string;
|
|
4
|
-
data?: D;
|
|
5
|
-
}
|
|
6
|
-
export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>;
|
|
7
|
-
export interface Pagination {
|
|
8
|
-
current?: number;
|
|
9
|
-
pageSize?: number;
|
|
10
|
-
}
|
|
11
|
-
export type SortParams<D extends object | string = string> = Record<D extends string ? string : keyof D, 'ascend' | 'descend'>;
|
|
12
|
-
export type OrderParams<D extends object | string = string> = {
|
|
13
|
-
field: D extends string ? string : keyof D;
|
|
14
|
-
type: 'asc' | 'desc';
|
|
15
|
-
};
|
package/dist/esm/fe/dayjs.d.ts
DELETED
package/dist/esm/fe/dayjs.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
export { default } from 'dayjs';
|
|
3
|
-
import isBetween from 'dayjs/plugin/isBetween';
|
|
4
|
-
import weekday from 'dayjs/plugin/weekday';
|
|
5
|
-
import localeData from 'dayjs/plugin/localeData';
|
|
6
|
-
|
|
7
|
-
dayjs.extend(isBetween);
|
|
8
|
-
dayjs.extend(weekday);
|
|
9
|
-
dayjs.extend(localeData);
|
package/dist/esm/index_all.d.ts
DELETED
package/dist/esm/index_fe.d.ts
DELETED
package/dist/esm/index_fe.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { cloneDeep, debounce, find, groupBy, isBoolean, isEmpty, isEqual, isError, isFunction, isNumber, isObject, isString, default as lodash, merge, omit, pick, uniq, uniqBy, uniqWith } from 'lodash';
|
|
2
|
-
import * as consola from 'consola';
|
|
3
|
-
export { consola };
|
|
4
|
-
export { amount, getChinese, getChineseByStr, getCookie, getLength, getProxyUrl, getRandomColor, getRandomString, getSliceStr, getStrLength, getType, isJson, jsonParse, replaceAll, replaceByRules, toString } from './common/tools/string.js';
|
|
5
|
-
export { filterParams, findItem, watch } from './common/tools/object.js';
|
|
6
|
-
export { delay, executePromise, handleParams, handleRes2List, locationFn } from './common/tools/other.js';
|
|
7
|
-
export { getFileSize, getRandomNum, limitDecimals } from './common/tools/number.js';
|
|
8
|
-
export { localforage } from './fe/index.js';
|
|
9
|
-
import './fe/dayjs.js';
|
|
10
|
-
export { default as dayjs } from 'dayjs';
|
|
11
|
-
export { flashBackground, flashBorder, hexToRgba } from './fe/style.js';
|
|
12
|
-
export { getElement, isElementInViewport, scrollIntoView } from './fe/element.js';
|
|
13
|
-
export { default as copy } from 'copy-to-clipboard';
|
|
14
|
-
export { default as classnames } from 'classnames';
|
|
15
|
-
export { default as md5 } from 'md5';
|
|
16
|
-
export { default as anime } from 'animejs';
|
package/dist/esm/index_rd.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|