@nuka9510/simple-validation 1.0.8 → 1.0.10

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.
@@ -1,40 +1,38 @@
1
- declare module 'validation' {
2
- type InputElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
1
+ export type InputElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
3
2
 
4
- /** 결과 값 객체 */
5
- interface result {
6
- /** #default `true` */
7
- flag: boolean;
8
- /** #default `null` */
9
- alertMsg: string | null;
10
- /** #default `null` */
11
- el: InputElement | null;
12
- }
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
+ }
13
12
 
14
- interface dateEl {
15
- S?: InputElement;
16
- E?: InputElement;
17
- }
13
+ export interface dateEl {
14
+ S?: InputElement;
15
+ E?: InputElement;
16
+ }
18
17
 
19
- /** validation check할 Element를 담는 객체 */
20
- interface el {
21
- el?: InputElement[];
22
- date?: {
23
- [date: string]: dateEl;
24
- };
25
- }
18
+ /** validation check할 Element를 담는 객체 */
19
+ export interface el {
20
+ el?: InputElement[];
21
+ date?: {
22
+ [date: string]: dateEl;
23
+ };
24
+ }
26
25
 
27
- interface radio {
28
- [required: string]: InputElement[];
29
- }
26
+ export interface radio {
27
+ [required: string]: InputElement[];
28
+ }
30
29
 
31
- /** validation에 사용할 정규식을 담은 객체 */
32
- interface regex {
33
- [pattern: string]: RegExp;
34
- }
30
+ /** validation에 사용할 정규식을 담은 객체 */
31
+ export interface regex {
32
+ [pattern: string]: RegExp;
33
+ }
35
34
 
36
- /** validation 초기화를 위한 객체 */
37
- interface config {
38
- regex?: regex;
39
- }
35
+ /** validation 초기화를 위한 객체 */
36
+ export interface config {
37
+ regex?: regex;
40
38
  }
@@ -1,5 +1,4 @@
1
- /// <reference path="../@types/index.d.ts" />
2
- import { config, result } from "validation";
1
+ import { config, result } from "../@types/validation";
3
2
  /**
4
3
  * Validation Check를 위한 객체
5
4
  */
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@nuka9510/simple-validation",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
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
  },
@@ -29,6 +30,6 @@
29
30
  },
30
31
  "homepage": "https://github.com/nuka9510/simple-validation",
31
32
  "dependencies": {
32
- "@nuka9510/js-util": "^1.0.24"
33
+ "@nuka9510/js-util": "^1.0.26"
33
34
  }
34
35
  }
package/src/validation.ts CHANGED
@@ -1,5 +1,4 @@
1
- /// <reference path="../@types/index.d.ts" />
2
- import { config, el, InputElement, radio, regex, result } from "validation";
1
+ import { config, el, InputElement, radio, regex, result } from "../@types/validation";
3
2
  import { JUtil } from "@nuka9510/js-util";
4
3
 
5
4
  /**
package/tsconfig.json CHANGED
@@ -11,5 +11,5 @@
11
11
  "declaration": true,
12
12
  "outDir": "dist"
13
13
  },
14
- "include": [ "src/index.ts" ]
14
+ "include": ["src/index.ts"]
15
15
  }
package/@types/index.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference path="validation.d.ts" />