Skip to content

Commit e952c5a

Browse files
committed
chore: format code and update README examples for multiform-validator
1 parent b481da0 commit e952c5a

File tree

5 files changed

+126
-129
lines changed

5 files changed

+126
-129
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm
4747

4848
```html
4949
<script type="module">
50-
import mv from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm"
50+
import mv from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm";
5151
</script>
5252
```
5353

@@ -56,25 +56,25 @@ https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm
5656
```html
5757
<script src="https://unpkg.com/multiform-validator@2.6.1/dist/index.js"></script>
5858
<script>
59-
// Multiform-validator is available in the global scope
60-
const emailResult = isEmail("123456");
61-
const cpfResult = cpfIsValid("123456");
59+
// Multiform-validator is available in the global scope
60+
const emailResult = isEmail("123456");
61+
const cpfResult = cpfIsValid("123456");
6262
63-
console.log(emailResult); // returns false
64-
console.log(cpfResult.isValid); // returns false
63+
console.log(emailResult); // returns false
64+
console.log(cpfResult.isValid); // returns false
6565
</script>
6666
```
6767

6868
```html
6969
<script type="module">
70-
// You can also import only the functions you need
71-
// like: import { isEmail, cpfIsValid } from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm";
72-
import mv from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm";
73-
const emailResult = mv.isEmail("123456");
74-
const cpfResult = mv.cpfIsValid("123456");
75-
76-
console.log(emailResult); // returns false
77-
console.log(cpfResult.isValid); // returns false
70+
// You can also import only the functions you need
71+
// like: import { isEmail, cpfIsValid } from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm";
72+
import mv from "https://cdn.jsdelivr.net/npm/multiform-validator@2.6.1/+esm";
73+
const emailResult = mv.isEmail("123456");
74+
const cpfResult = mv.cpfIsValid("123456");
75+
76+
console.log(emailResult); // returns false
77+
console.log(cpfResult.isValid); // returns false
7878
</script>
7979
```
8080

package.json

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
11
{
2-
"name": "multiform-validator",
3-
"version": "2.6.1",
4-
"description": "Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.",
5-
"main": "./dist/index.js",
6-
"types": "./types/index.d.ts",
7-
"files": [
8-
"dist",
9-
"types"
10-
],
11-
"funding": [
12-
{
13-
"type": "github",
14-
"url": "https://github.com/sponsors/gabriel-logan"
15-
},
16-
{
17-
"type": "buy-me-a-coffee",
18-
"url": "https://buymeacoffee.com/gabriellogan"
19-
}
20-
],
21-
"scripts": {
22-
"test": "jest --verbose",
23-
"test:cov": "jest --coverage",
24-
"test:full": "jest --verbose --coverage",
25-
"test:file": "jest tests/src/isDecimal.test --watch",
26-
"test:watch": "jest --watch",
27-
"build:types": "tsc -p tsconfig.types.json",
28-
"build:dist": "tsc",
29-
"build:clean": "rm -rf dist && rm -rf types",
30-
"build": "yarn build:clean && yarn build:types && yarn build:dist",
31-
"lint": "eslint src/**/*.ts tests/**/*.ts",
32-
"lint:fix": "yarn lint --fix",
33-
"format": "prettier --write '**/*.{ts,js}'",
34-
"pr-check": "yarn format && yarn lint && yarn build && yarn test"
35-
},
36-
"repository": {
37-
"type": "git",
38-
"url": "git+https://github.com/Multiform-Validator/typescript-javascript.git"
39-
},
40-
"keywords": [
41-
"validator",
42-
"multiform",
43-
"validação",
44-
"email-validator",
45-
"multiform-validator",
46-
"javascript",
47-
"npm",
48-
"security",
49-
"safe",
50-
"pentest",
51-
"security-tools",
52-
"Validator",
53-
"validate",
54-
"magic number",
55-
"magic number validator",
56-
"magic numbers",
57-
"cpf",
58-
"cnpj",
59-
"email validator",
60-
"password",
61-
"email",
62-
"isEmail",
63-
"image"
64-
],
65-
"author": {
66-
"name": "Gabriel Logan",
67-
"url": "https://github.com/gabriel-logan"
68-
},
69-
"license": "MIT",
70-
"bugs": {
71-
"url": "https://github.com/Multiform-Validator/typescript-javascript/issues"
72-
},
73-
"homepage": "https://multiformvalidator.netlify.app",
74-
"contributors": [
75-
"Gabriel Logan",
76-
"Breno A"
77-
],
78-
"devDependencies": {
79-
"@eslint/js": "^9.20.0",
80-
"@types/jest": "^29.5.14",
81-
"@types/node": "^22.13.4",
82-
"eslint": "^9.20.1",
83-
"eslint-config-prettier": "^10.0.1",
84-
"eslint-plugin-prettier": "^5.2.3",
85-
"jest": "^29.7.0",
86-
"prettier": "^3.5.1",
87-
"ts-jest": "^29.2.5",
88-
"ts-loader": "^9.5.2",
89-
"ts-node": "^10.9.2",
90-
"typescript": "^5.7.3",
91-
"typescript-eslint": "^8.24.0"
92-
},
93-
"packageManager": "yarn@4.9.4"
2+
"name": "multiform-validator",
3+
"version": "2.6.1",
4+
"description": "Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.",
5+
"main": "./dist/index.js",
6+
"types": "./types/index.d.ts",
7+
"files": [
8+
"dist",
9+
"types"
10+
],
11+
"funding": [
12+
{
13+
"type": "github",
14+
"url": "https://github.com/sponsors/gabriel-logan"
15+
},
16+
{
17+
"type": "buy-me-a-coffee",
18+
"url": "https://buymeacoffee.com/gabriellogan"
19+
}
20+
],
21+
"scripts": {
22+
"test": "jest --verbose",
23+
"test:cov": "jest --coverage",
24+
"test:full": "jest --verbose --coverage",
25+
"test:file": "jest tests/src/isDecimal.test --watch",
26+
"test:watch": "jest --watch",
27+
"build:types": "tsc -p tsconfig.types.json",
28+
"build:dist": "tsc",
29+
"build:clean": "rm -rf dist && rm -rf types",
30+
"build": "yarn build:clean && yarn build:types && yarn build:dist",
31+
"lint": "eslint src/**/*.ts tests/**/*.ts",
32+
"lint:fix": "yarn lint --fix",
33+
"format": "prettier --write **/*.{ts,js,json,md,yml}",
34+
"pr-check": "yarn format && yarn lint && yarn build && yarn test"
35+
},
36+
"repository": {
37+
"type": "git",
38+
"url": "git+https://github.com/Multiform-Validator/typescript-javascript.git"
39+
},
40+
"keywords": [
41+
"validator",
42+
"multiform",
43+
"validação",
44+
"email-validator",
45+
"multiform-validator",
46+
"javascript",
47+
"npm",
48+
"security",
49+
"safe",
50+
"pentest",
51+
"security-tools",
52+
"Validator",
53+
"validate",
54+
"magic number",
55+
"magic number validator",
56+
"magic numbers",
57+
"cpf",
58+
"cnpj",
59+
"email validator",
60+
"password",
61+
"email",
62+
"isEmail",
63+
"image"
64+
],
65+
"author": {
66+
"name": "Gabriel Logan",
67+
"url": "https://github.com/gabriel-logan"
68+
},
69+
"license": "MIT",
70+
"bugs": {
71+
"url": "https://github.com/Multiform-Validator/typescript-javascript/issues"
72+
},
73+
"homepage": "https://multiformvalidator.netlify.app",
74+
"contributors": [
75+
"Gabriel Logan",
76+
"Breno A"
77+
],
78+
"devDependencies": {
79+
"@eslint/js": "^9.20.0",
80+
"@types/jest": "^29.5.14",
81+
"@types/node": "^22.13.4",
82+
"eslint": "^9.20.1",
83+
"eslint-config-prettier": "^10.0.1",
84+
"eslint-plugin-prettier": "^5.2.3",
85+
"jest": "^29.7.0",
86+
"prettier": "^3.5.1",
87+
"ts-jest": "^29.2.5",
88+
"ts-loader": "^9.5.2",
89+
"ts-node": "^10.9.2",
90+
"typescript": "^5.7.3",
91+
"typescript-eslint": "^8.24.0"
92+
},
93+
"packageManager": "yarn@4.9.4"
9494
}

tsconfig.eslint.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"extends": "./tsconfig.json",
3-
"include": [
4-
"tests/**/*",
5-
"eslint.config.mjs"
6-
]
2+
"extends": "./tsconfig.json",
3+
"include": ["tests/**/*", "eslint.config.mjs"]
74
}

tsconfig.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"compilerOptions": {
3-
"target": "ES2017",
4-
"module": "CommonJS",
5-
"outDir": "./dist",
6-
"forceConsistentCasingInFileNames": true,
7-
"strict": true,
8-
"skipLibCheck": true,
9-
"strictNullChecks": true,
10-
"removeComments": true
11-
},
12-
"include": ["src/**/*", "index.ts"],
2+
"compilerOptions": {
3+
"target": "ES2017",
4+
"module": "CommonJS",
5+
"outDir": "./dist",
6+
"forceConsistentCasingInFileNames": true,
7+
"strict": true,
8+
"skipLibCheck": true,
9+
"strictNullChecks": true,
10+
"removeComments": true
11+
},
12+
"include": ["src/**/*", "index.ts"]
1313
}

tsconfig.types.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"extends": "./tsconfig.json",
3-
"compilerOptions": {
4-
"declaration": true,
5-
"declarationDir": "./types",
6-
"removeComments": false,
7-
"emitDeclarationOnly": true
8-
}
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"declaration": true,
5+
"declarationDir": "./types",
6+
"removeComments": false,
7+
"emitDeclarationOnly": true
8+
}
99
}

0 commit comments

Comments
 (0)