jsdomain-parser 1.0.1 → 1.0.3

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.
@@ -6868,7 +6868,7 @@ var icann = {
6868
6868
  zone: 1,
6869
6869
  zuerich: 1
6870
6870
  };
6871
- var tlds = {
6871
+ var tlds$1 = {
6872
6872
  icann: icann,
6873
6873
  "private": {
6874
6874
  "12chars.dev": 2,
@@ -9781,6 +9781,18 @@ var tlds = {
9781
9781
  }
9782
9782
  };
9783
9783
 
9784
+ var tlds$2 = /*#__PURE__*/Object.freeze({
9785
+ __proto__: null,
9786
+ icann: icann,
9787
+ 'default': tlds$1
9788
+ });
9789
+
9790
+ function getCjsExportFromNamespace (n) {
9791
+ return n && n['default'] || n;
9792
+ }
9793
+
9794
+ var tlds = getCjsExportFromNamespace(tlds$2);
9795
+
9784
9796
  const parseTld = (hostname, options = {}) => {
9785
9797
  const {
9786
9798
  allowUnknown = false,
@@ -9832,14 +9844,16 @@ const parseTld = (hostname, options = {}) => {
9832
9844
  length: detected.length,
9833
9845
  parts: detected,
9834
9846
  };
9835
- };
9847
+ };
9848
+
9849
+ var parseTld_1 = parseTld;
9836
9850
 
9837
9851
  function parse(url, options = {}) {
9838
9852
  try {
9839
9853
  if (!url.startsWith("http")) url = `http://${url}`;
9840
9854
  const urlObject = new URL(url);
9841
9855
 
9842
- const tldData = parseTld(urlObject.hostname, options);
9856
+ const tldData = parseTld_1(urlObject.hostname, options);
9843
9857
 
9844
9858
  let domain = urlObject.hostname;
9845
9859
  const hostnameParts = urlObject.hostname.split(".");
@@ -9875,6 +9889,10 @@ function parse(url, options = {}) {
9875
9889
  } catch (e) {
9876
9890
  throw new Error(`Invalid URL: ${e}`);
9877
9891
  }
9878
- }
9892
+ }
9893
+
9894
+ var jsdomainParser = { parse, parseTld: parseTld_1 };
9895
+ var jsdomainParser_1 = jsdomainParser.parse;
9896
+ var jsdomainParser_2 = jsdomainParser.parseTld;
9879
9897
 
9880
- export { parse, parseTld };
9898
+ export { jsdomainParser as default, jsdomainParser_1 as parse, jsdomainParser_2 as parseTld };