jsdomain-parser 1.0.7 → 1.0.8

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.
@@ -15,21 +15,21 @@
15
15
  font-family: monospace;
16
16
  }
17
17
  </style>
18
+
19
+ <script src="../dist//jsdomain-parser.umd.min.js"></script>
18
20
  </head>
19
21
  <body>
20
22
  <input type="text" placeholder="Enter URL" />
21
23
  <button id="parse">Parse</button>
22
24
  <div id="result"></div>
23
25
  <script type="module">
24
- import { parse } from "../dist/jsdomain-parser.esm.js";
25
-
26
26
  document.querySelector("#parse").addEventListener("click", () => {
27
27
  const input = document.querySelector("input").value;
28
28
 
29
29
  let parsed;
30
30
 
31
31
  try {
32
- parsed = parse(input, {
32
+ parsed = jsDomainParser.parse(input, {
33
33
  allowPrivate: true, // allow private TLDs
34
34
  allowUnknown: false, // restrict to known TLDs only
35
35
  extendedTlds: ["my.tld", "tld"], // add custom TLDs to extend the list
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsdomain-parser",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Parse URLs to extract TLDs, domain, protocols and more",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/rollup.config.js CHANGED
@@ -25,15 +25,15 @@ export default {
25
25
  plugins: [terser()],
26
26
  },
27
27
  {
28
- file: "dist/jsdomain-parser.min.js",
29
- format: "iife",
30
- name: "DomainParser",
31
- plugins: [terser()],
28
+ file: "dist/jsdomain-parser.umd.js",
29
+ format: "umd",
30
+ name: "jsDomainParser",
32
31
  },
33
32
  {
34
- file: "dist/jsdomain-parser.js",
35
- format: "iife",
36
- name: "DomainParser",
33
+ file: "dist/jsdomain-parser.umd.min.js",
34
+ format: "umd",
35
+ name: "jsDomainParser",
36
+ plugins: [terser()],
37
37
  },
38
38
  ],
39
39
  plugins: [resolve(), commonjs(), json()],