tldts-experimental 6.0.0 → 6.0.1
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/cjs/index.js +9 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/packed-hashes.js +9 -4
- package/dist/cjs/src/packed-hashes.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/es6/src/packed-hashes.js +9 -4
- package/dist/es6/src/packed-hashes.js.map +1 -1
- package/dist/es6/tsconfig.bundle.tsbuildinfo +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +4 -4
- package/src/packed-hashes.ts +10 -4
package/dist/cjs/index.js
CHANGED
|
@@ -752,10 +752,15 @@ function suffixLookup(hostname, options, out) {
|
|
|
752
752
|
// was *.com, we would have stored only 'com' in the packed structure and we
|
|
753
753
|
// need to take one extra label on the left.
|
|
754
754
|
if ((matchKind & 16 /* Result.WILDCARD_MATCH */) !== 0) {
|
|
755
|
-
|
|
756
|
-
matchLabels
|
|
757
|
-
|
|
758
|
-
|
|
755
|
+
if (matchLabels < numberOfHashes) {
|
|
756
|
+
out.publicSuffix = hostname.slice(BUFFER[((matchLabels - 1) << 1) + 1]);
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
const parts = hostname.split('.');
|
|
760
|
+
while (parts.length > matchLabels) {
|
|
761
|
+
parts.shift();
|
|
762
|
+
}
|
|
763
|
+
out.publicSuffix = parts.join('.');
|
|
759
764
|
return;
|
|
760
765
|
}
|
|
761
766
|
// if ((matchKind & Result.NORMAL_MATCH) !== 0)
|