@nuka9510/simple-validation 1.0.7 → 1.0.9
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/@types/validation.d.ts +31 -36
- package/package.json +6 -3
- package/src/validation.ts +1 -1
- package/tsconfig.json +0 -18
package/@types/validation.d.ts
CHANGED
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
export =
|
|
2
|
-
export as namespace validation;
|
|
1
|
+
export type InputElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/** 결과 값 객체 */
|
|
4
|
+
export interface result {
|
|
5
|
+
/** #default `true` */
|
|
6
|
+
flag: boolean;
|
|
7
|
+
/** #default `null` */
|
|
8
|
+
alertMsg: string | null;
|
|
9
|
+
/** #default `null` */
|
|
10
|
+
el: InputElement | null;
|
|
11
|
+
}
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/** #default `null` */
|
|
12
|
-
alertMsg: string | null;
|
|
13
|
-
/** #default `null` */
|
|
14
|
-
el: InputElement | null;
|
|
15
|
-
}
|
|
13
|
+
export interface dateEl {
|
|
14
|
+
S?: InputElement;
|
|
15
|
+
E?: InputElement;
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
/** validation check할 Element를 담는 객체 */
|
|
19
|
+
export interface el {
|
|
20
|
+
el?: InputElement[];
|
|
21
|
+
date?: {
|
|
22
|
+
[date: string]: dateEl;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
date?: {
|
|
26
|
-
[date: string]: dateEl;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
26
|
+
export interface radio {
|
|
27
|
+
[required: string]: InputElement[];
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
/** validation에 사용할 정규식을 담은 객체 */
|
|
31
|
+
export interface regex {
|
|
32
|
+
[pattern: string]: RegExp;
|
|
33
|
+
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/** validation 초기화를 위한 객체 */
|
|
40
|
-
interface config {
|
|
41
|
-
regex?: regex;
|
|
42
|
-
}
|
|
35
|
+
/** validation 초기화를 위한 객체 */
|
|
36
|
+
export interface config {
|
|
37
|
+
regex?: regex;
|
|
43
38
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuka9510/simple-validation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "simple validation util for web front-end",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"directories": {
|
|
7
8
|
"example": "example"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "rm -r -f dist && tsc",
|
|
13
|
+
"postversion": "git push && git push --tag && npm publish --access=public"
|
|
11
14
|
},
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
|
@@ -27,6 +30,6 @@
|
|
|
27
30
|
},
|
|
28
31
|
"homepage": "https://github.com/nuka9510/simple-validation",
|
|
29
32
|
"dependencies": {
|
|
30
|
-
"@nuka9510/js-util": "^1.0.
|
|
33
|
+
"@nuka9510/js-util": "^1.0.25"
|
|
31
34
|
}
|
|
32
35
|
}
|
package/src/validation.ts
CHANGED
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"typeRoots": ["@types"],
|
|
4
|
-
"checkJs": true,
|
|
5
|
-
"strictNullChecks": false,
|
|
6
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
7
|
-
"noUncheckedIndexedAccess": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"useDefineForClassFields": true,
|
|
10
|
-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
11
|
-
"target": "ESNext",
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"outDir": "dist"
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"src/index.ts"
|
|
17
|
-
]
|
|
18
|
-
}
|