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.
- package/README.md +6 -2
- package/dist/jsdomain-parser.cjs.js +2 -1
- package/dist/jsdomain-parser.cjs.min.js +1 -1
- package/dist/jsdomain-parser.esm.js +2 -1
- package/dist/jsdomain-parser.esm.min.js +1 -1
- package/dist/{jsdomain-parser.js → jsdomain-parser.umd.js} +8 -6
- package/dist/jsdomain-parser.umd.min.js +1 -0
- package/example/example.html +3 -3
- package/package.json +1 -1
- package/rollup.config.js +7 -7
- package/dist/jsdomain-parser.min.js +0 -1
|
@@ -9856,6 +9856,7 @@ const parseTld = (url, options = {}) => {
|
|
|
9856
9856
|
}
|
|
9857
9857
|
}
|
|
9858
9858
|
|
|
9859
|
+
// handle case where hostname is an IP address
|
|
9859
9860
|
const isIP = /^\d{1,3}(\.\d{1,3}){3}$/.test(hostname);
|
|
9860
9861
|
|
|
9861
9862
|
if (detected.length == 0 && !isIP) {
|
|
@@ -9930,7 +9931,7 @@ function parse(url, options = {}) {
|
|
|
9930
9931
|
url: urlData,
|
|
9931
9932
|
};
|
|
9932
9933
|
} catch (e) {
|
|
9933
|
-
throw new Error(`Invalid URL: ${e}`);
|
|
9934
|
+
throw new Error(`Invalid URL: ${e.message}`);
|
|
9934
9935
|
}
|
|
9935
9936
|
}
|
|
9936
9937
|
|