Skip to content

Commit

Permalink
fix: esm and cjs import and require, update multiform-validator to ve…
Browse files Browse the repository at this point in the history
…rsion 2.2.9 and package.json to reflect the change
  • Loading branch information
gabriel-logan committed Oct 20, 2024
1 parent f2c33fe commit 0698ade
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Feel free to find bugs and report them to me. Your feedback is highly appreciate
jsDelivr:

```bash
https://cdn.jsdelivr.net/npm/[email protected].7/+esm
https://cdn.jsdelivr.net/npm/[email protected].9/+esm
```

```html
<script type="module">
import multiform-validator from "https://cdn.jsdelivr.net/npm/[email protected].7/+esm"
import multiform-validator from "https://cdn.jsdelivr.net/npm/[email protected].9/+esm"
</script>
```

Expand All @@ -44,11 +44,11 @@ https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/index.min.js
unpkg:

```bash
https://unpkg.com/[email protected].0/dist/cjs/index.js
https://unpkg.com/[email protected].9/dist/cjs/index.cjs
```

```html
<script src="https://unpkg.com/[email protected].0/dist/cjs/index.js"></script>
<script src="https://unpkg.com/[email protected].9/dist/cjs/index.cjs"></script>
```

### Example of use with CDN
Expand All @@ -71,7 +71,7 @@ using esm:

```html
<script type="module">
import multiformValidator from "https://cdn.jsdelivr.net/npm/[email protected].7/+esm";
import multiformValidator from "https://cdn.jsdelivr.net/npm/[email protected].9/+esm";
const emailResult = multiformValidator.isEmail("123456");
const cpfResult = multiformValidator.cpfIsValid("123456");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multiform-validator",
"version": "2.2.8",
"version": "2.2.9",
"description": "Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.mjs",
Expand Down

0 comments on commit 0698ade

Please sign in to comment.