@egova-mobile/app-media-utils 0.0.1

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.
@@ -0,0 +1,29 @@
1
+ export declare const weekList: string[];
2
+ export declare const FORMAT: {
3
+ FORMAT_HM: string;
4
+ FORMAT_MDHM: string;
5
+ FORMAT_MD_CN: string;
6
+ FORMAT_MD: string;
7
+ FORMAT_YMD: string;
8
+ FORMAT_YMD_SLASH: string;
9
+ FORMAT_YM: string;
10
+ FORMAT_YMDHM: string;
11
+ FORMAT_YMDHMS: string;
12
+ FORMAT_YMDHMSMS: string;
13
+ FORMAT_YM_CN: string;
14
+ FORMAT_YMD_CN: string;
15
+ FORMAT_YMDH_CN: string;
16
+ FORMAT_MDH_CN: string;
17
+ FORMAT_YMDHM_CN: string;
18
+ FORMAT_YMDHMS_CN: string;
19
+ };
20
+ /**
21
+ * 创建 Date对象
22
+ * @param dateObj 可传入:
23
+ * 1. number格式的timestamp;
24
+ * 2. string格式的日期字符串
25
+ * 3. Date对象将原封不动的返回
26
+ * @returns {null|Date|*}
27
+ */
28
+ export declare function createDate(dateObj: string | number | Date): Date | null;
29
+ export declare function formatDate(dateObj: number | string | Date, formatType?: string): string | null;
@@ -0,0 +1,4 @@
1
+ export * from './type-check';
2
+ export * from './type-parse';
3
+ export * from './date';
4
+ export * from './system-check';
@@ -0,0 +1,4 @@
1
+ export declare function checkIsAndroid(): boolean;
2
+ export declare function checkIsIOS(): boolean;
3
+ export declare function checkIsMacOS(): boolean;
4
+ export declare function checkIsWindows(): boolean;
@@ -0,0 +1,15 @@
1
+ export default function checkDataType(tgt: any, type: string): string | boolean;
2
+ export declare function checkIsUndefined(tgt: any): string | boolean;
3
+ export declare function checkIsNull(tgt: any): string | boolean;
4
+ export declare function checkIsUndefinedOrNull(tgt: any): string | boolean;
5
+ export declare function checkIsNumber(tgt: any): string | boolean;
6
+ export declare function checkIsString(tgt: any): string | boolean;
7
+ export declare function checkIsStringValid(tgt: any): boolean;
8
+ export declare function checkIsBoolean(tgt: any): string | boolean;
9
+ export declare function checkIsSymbol(tgt: any): string | boolean;
10
+ export declare function checkIsObject(tgt: any): string | boolean;
11
+ export declare function checkIsArray(tgt: any): string | boolean;
12
+ export declare function checkIsFunction(tgt: any): string | boolean;
13
+ export declare function checkIsDate(tgt: any): string | boolean;
14
+ export declare function checkIsRegExp(tgt: any): string | boolean;
15
+ export declare function checkIsError(tgt: any): string | boolean;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 解析整数
3
+ * @param obj, 输入字符串
4
+ * @param defaultValue,默认值
5
+ */
6
+ export declare function parseInteger(obj: string, defaultValue: number): number;
7
+ /**
8
+ * 解析小数
9
+ * @param obj, 输入字符串
10
+ * @param defaultValue,默认值
11
+ */
12
+ export declare function parseDecimal(obj: string, defaultValue: number): number;
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@egova-mobile/app-media-utils",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.esm.mjs",
7
+ "typings": "dist/index.d.ts",
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.esm.mjs",
15
+ "require": "./dist/index.cjs.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "author": "egova",
22
+ "devDependencies": {
23
+ "@types/crypto-js": "^4.1.1",
24
+ "@types/node": "^18.18.5",
25
+ "@types/sm-crypto": "^0.3.0",
26
+ "@types/validator": "^13.11.1",
27
+ "axios": "^1.5.0",
28
+ "dayjs": "^1.11.8",
29
+ "esbuild": "^0.18.11",
30
+ "rimraf": "^5.0.1",
31
+ "typescript": "^5.0.4"
32
+ },
33
+ "peerDependencies": {
34
+ "dayjs": "^1.11.8"
35
+ },
36
+ "scripts": {
37
+ "clean": "rimraf ./dist",
38
+ "dev": "node ./build.js -w",
39
+ "build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
40
+ "build:bundle": "node ./build.js",
41
+ "build": "pnpm clean && pnpm build:bundle && pnpm build:types",
42
+ "release": "zartui-mobile-cli release"
43
+ }
44
+ }