jsdomain-parser 1.0.1 → 1.0.2
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/dist/jsdomain-parser.cjs.js +25 -6
- package/dist/jsdomain-parser.cjs.min.js +1 -1
- package/dist/jsdomain-parser.esm.js +23 -5
- package/dist/jsdomain-parser.esm.min.js +1 -1
- package/dist/jsdomain-parser.js +25 -6
- package/dist/jsdomain-parser.min.js +1 -1
- package/{src/index.js → index.js} +2 -2
- package/package.json +2 -3
- package/rollup.config.js +1 -1
- package/src/parseTld.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const parseTld = require("./src/parseTld.js");
|
|
2
2
|
|
|
3
3
|
function parse(url, options = {}) {
|
|
4
4
|
try {
|
|
@@ -43,4 +43,4 @@ function parse(url, options = {}) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
module.exports = { parse, parseTld };
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsdomain-parser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Parse URLs to extract TLDs, domain, protocols and more",
|
|
5
|
-
"main": "
|
|
6
|
-
"type": "module",
|
|
5
|
+
"main": "index.js",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"build": "rollup -c"
|
|
9
8
|
},
|
package/rollup.config.js
CHANGED
package/src/parseTld.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const tlds = require("./tlds.json");
|
|
2
2
|
|
|
3
3
|
const parseTld = (hostname, options = {}) => {
|
|
4
4
|
const {
|
|
@@ -53,4 +53,4 @@ const parseTld = (hostname, options = {}) => {
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
module.exports = parseTld;
|