Skip to content

Commit 5553f36

Browse files
committed
bump: 2.2.3
fix: cdn links
1 parent f434538 commit 5553f36

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

README.md

+33-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,23 @@ Feel free to find bugs and report them to me. Your feedback is highly appreciate
1515

1616
## CDNs
1717

18+
### ESM:
19+
1820
jsDelivr:
1921

20-
CJS:
22+
```bash
23+
https://cdn.jsdelivr.net/npm/[email protected]/+esm
24+
```
25+
26+
```html
27+
<script type="module">
28+
import multiform-validator from "https://cdn.jsdelivr.net/npm/[email protected]/+esm"
29+
</script>
30+
```
31+
32+
### CJS:
33+
34+
jsDelivr:
2135

2236
```bash
2337
https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/index.min.js
@@ -29,18 +43,18 @@ https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/index.min.js
2943

3044
unpkg:
3145

32-
CJS:
33-
3446
```bash
35-
https://unpkg.com/[email protected].1/dist/cjs/index.cjs
47+
https://unpkg.com/[email protected].0/dist/cjs/index.js
3648
```
3749

3850
```html
39-
<script src="https://unpkg.com/[email protected].1/dist/cjs/index.cjs"></script>
51+
<script src="https://unpkg.com/[email protected].0/dist/cjs/index.js"></script>
4052
```
4153

4254
### Example of use with CDN
4355

56+
using cjs:
57+
4458
```html
4559
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/index.min.js"></script>
4660
<script>
@@ -51,6 +65,20 @@ https://unpkg.com/[email protected]/dist/cjs/index.cjs
5165
console.log(cpfResult.isValid); // returns false
5266
</script>
5367
```
68+
or
69+
70+
using esm:
71+
72+
```html
73+
<script type="module">
74+
import multiformValidator from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
75+
const emailResult = multiformValidator.isEmail("123456");
76+
const cpfResult = multiformValidator.cpfIsValid("123456");
77+
78+
console.log(emailResult); // returns false
79+
console.log(cpfResult.isValid); // returns false
80+
</script>
81+
```
5482

5583
## Installation
5684

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"name": "multiform-validator",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.",
55
"main": "./dist/cjs/index.cjs",
66
"module": "./dist/esm/index.mjs",
77
"types": "./types/index.d.ts",
8-
"unpkg": "./dist/cjs/index.cjs",
98
"exports": {
109
".": {
1110
"import": "./dist/esm/index.mjs",

0 commit comments

Comments
 (0)