tldts-core 7.0.32 → 7.1.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 +238 -66
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/extract-hostname.js +227 -71
- package/dist/cjs/src/extract-hostname.js.map +1 -1
- package/dist/cjs/src/factory.js +9 -1
- package/dist/cjs/src/factory.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/es6/src/extract-hostname.js +227 -71
- package/dist/es6/src/extract-hostname.js.map +1 -1
- package/dist/es6/src/factory.js +9 -1
- package/dist/es6/src/factory.js.map +1 -1
- package/dist/es6/tsconfig.bundle.tsbuildinfo +1 -1
- package/dist/types/src/extract-hostname.d.ts +10 -2
- package/dist/types/src/factory.d.ts +1 -1
- package/package.json +2 -2
- package/src/extract-hostname.ts +241 -79
- package/src/factory.ts +10 -2
|
@@ -2,138 +2,294 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = extractHostname;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Matches an ASCII tab (U+0009) or newline (U+000A / U+000D). The WHATWG URL
|
|
6
|
+
* parser strips these before parsing; we only allocate a cleaned copy (and
|
|
7
|
+
* re-parse) on the rare input that actually contains one.
|
|
8
|
+
*/
|
|
9
|
+
const CONTROL_CHARS = /[\t\n\r]/g;
|
|
10
|
+
/**
|
|
11
|
+
* Classify scheme `url.slice(schemeStart, colonIndex)` as a WHATWG special
|
|
12
|
+
* scheme without allocating a substring (case-insensitive via `| 32`).
|
|
13
|
+
* Special schemes: ftp, file, http, https, ws, wss
|
|
14
|
+
* (https://url.spec.whatwg.org/#special-scheme).
|
|
15
|
+
*
|
|
16
|
+
* @returns 0 = not special, 1 = special, 2 = file (its host sits only between
|
|
17
|
+
* "//" and the next slash).
|
|
18
|
+
*/
|
|
19
|
+
function getSpecialScheme(url, schemeStart, colonIndex) {
|
|
20
|
+
const length = colonIndex - schemeStart;
|
|
21
|
+
const c0 = url.charCodeAt(schemeStart) | 32;
|
|
22
|
+
if (length === 2) {
|
|
23
|
+
return c0 === 119 && (url.charCodeAt(schemeStart + 1) | 32) === 115 ? 1 : 0; // ws
|
|
24
|
+
}
|
|
25
|
+
else if (length === 3) {
|
|
26
|
+
const c1 = url.charCodeAt(schemeStart + 1) | 32;
|
|
27
|
+
const c2 = url.charCodeAt(schemeStart + 2) | 32;
|
|
28
|
+
if (c0 === 119 && c1 === 115 && c2 === 115)
|
|
29
|
+
return 1; // wss
|
|
30
|
+
if (c0 === 102 && c1 === 116 && c2 === 112)
|
|
31
|
+
return 1; // ftp
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
else if (length === 4) {
|
|
35
|
+
const c1 = url.charCodeAt(schemeStart + 1) | 32;
|
|
36
|
+
const c2 = url.charCodeAt(schemeStart + 2) | 32;
|
|
37
|
+
const c3 = url.charCodeAt(schemeStart + 3) | 32;
|
|
38
|
+
if (c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112)
|
|
39
|
+
return 1; // http
|
|
40
|
+
if (c0 === 102 && c1 === 105 && c2 === 108 && c3 === 101)
|
|
41
|
+
return 2; // file
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
else if (length === 5) {
|
|
45
|
+
return c0 === 104 &&
|
|
46
|
+
(url.charCodeAt(schemeStart + 1) | 32) === 116 &&
|
|
47
|
+
(url.charCodeAt(schemeStart + 2) | 32) === 116 &&
|
|
48
|
+
(url.charCodeAt(schemeStart + 3) | 32) === 112 &&
|
|
49
|
+
(url.charCodeAt(schemeStart + 4) | 32) === 115
|
|
50
|
+
? 1
|
|
51
|
+
: 0; // https
|
|
52
|
+
}
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Extract a hostname from `url`, matching a WHATWG URL parser's host-boundary
|
|
57
|
+
* behaviour (https://url.spec.whatwg.org/#concept-basic-url-parser) for tldts'
|
|
58
|
+
* scope. It deliberately does NOT normalise the host (no IDNA/punycode or IPv4
|
|
59
|
+
* canonicalisation; IPv6 brackets are stripped, not compressed), strips trailing
|
|
60
|
+
* dots, and stays lenient where a strict parser rejects (bare host:port,
|
|
61
|
+
* out-of-range port, user@host) — all documented deviations.
|
|
62
|
+
*
|
|
63
|
+
* @param urlIsValidHostname - when true, `url` is already a valid hostname and is
|
|
64
|
+
* returned by the same reference (factory.ts skips re-validation on that
|
|
65
|
+
* identity), keeping the common path allocation-free.
|
|
7
66
|
*/
|
|
8
67
|
function extractHostname(url, urlIsValidHostname) {
|
|
9
68
|
let start = 0;
|
|
10
69
|
let end = url.length;
|
|
11
70
|
let hasUpper = false;
|
|
12
|
-
|
|
71
|
+
let isSpecial = false;
|
|
13
72
|
if (!urlIsValidHostname) {
|
|
14
|
-
//
|
|
73
|
+
// Data URLs never carry a host (and may be huge — short-circuit them).
|
|
15
74
|
if (url.startsWith('data:')) {
|
|
16
75
|
return null;
|
|
17
76
|
}
|
|
18
|
-
//
|
|
77
|
+
// WHATWG step 1: trim leading/trailing C0 control or space (<= U+0020).
|
|
78
|
+
// Tab/newline elsewhere are handled lazily below.
|
|
19
79
|
while (start < url.length && url.charCodeAt(start) <= 32) {
|
|
20
80
|
start += 1;
|
|
21
81
|
}
|
|
22
|
-
// Trim trailing spaces
|
|
23
82
|
while (end > start + 1 && url.charCodeAt(end - 1) <= 32) {
|
|
24
83
|
end -= 1;
|
|
25
84
|
}
|
|
26
|
-
// Skip scheme.
|
|
27
85
|
if (url.charCodeAt(start) === 47 /* '/' */ &&
|
|
28
86
|
url.charCodeAt(start + 1) === 47 /* '/' */) {
|
|
87
|
+
// Scheme-relative reference ("//host/path").
|
|
29
88
|
start += 2;
|
|
30
89
|
}
|
|
31
90
|
else {
|
|
32
91
|
const indexOfProtocol = url.indexOf(':/', start);
|
|
33
92
|
if (indexOfProtocol !== -1) {
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
c1 === 116 /* 't' */ &&
|
|
46
|
-
c2 === 116 /* 't' */ &&
|
|
47
|
-
c3 === 112 /* 'p' */ &&
|
|
48
|
-
c4 === 115 /* 's' */) {
|
|
49
|
-
// https
|
|
50
|
-
}
|
|
51
|
-
else if (protocolSize === 4 &&
|
|
52
|
-
c0 === 104 /* 'h' */ &&
|
|
53
|
-
c1 === 116 /* 't' */ &&
|
|
54
|
-
c2 === 116 /* 't' */ &&
|
|
55
|
-
c3 === 112 /* 'p' */) {
|
|
56
|
-
// http
|
|
57
|
-
}
|
|
58
|
-
else if (protocolSize === 3 &&
|
|
59
|
-
c0 === 119 /* 'w' */ &&
|
|
60
|
-
c1 === 115 /* 's' */ &&
|
|
61
|
-
c2 === 115 /* 's' */) {
|
|
62
|
-
// wss
|
|
93
|
+
// "scheme://…". Classify the scheme, then position `start` at the host.
|
|
94
|
+
const special = getSpecialScheme(url, start, indexOfProtocol);
|
|
95
|
+
if (special === 1) {
|
|
96
|
+
// Special scheme: skip the run of '/' and '\' after it
|
|
97
|
+
// (special-authority-(ignore-)slashes states; '\' acts as '/').
|
|
98
|
+
isSpecial = true;
|
|
99
|
+
start = indexOfProtocol + 2;
|
|
100
|
+
while (url.charCodeAt(start) === 47 /* '/' */ ||
|
|
101
|
+
url.charCodeAt(start) === 92 /* '\' */) {
|
|
102
|
+
start += 1;
|
|
103
|
+
}
|
|
63
104
|
}
|
|
64
|
-
else if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
105
|
+
else if (special === 2) {
|
|
106
|
+
// file: the host is only what sits between "//" and the next slash, so
|
|
107
|
+
// "file://h/x" => "h" but "file:///x" / "file:/x" => no host.
|
|
108
|
+
isSpecial = true;
|
|
109
|
+
start = indexOfProtocol + 1;
|
|
110
|
+
let slashes = 0;
|
|
111
|
+
while ((url.charCodeAt(start) === 47 || url.charCodeAt(start) === 92) &&
|
|
112
|
+
slashes < 2) {
|
|
113
|
+
start += 1;
|
|
114
|
+
slashes += 1;
|
|
115
|
+
}
|
|
116
|
+
if (slashes < 2) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
68
119
|
}
|
|
69
120
|
else {
|
|
70
|
-
//
|
|
121
|
+
// Unknown scheme: validate the WHATWG scheme grammar [A-Za-z0-9+.-];
|
|
122
|
+
// a control char means it was split by a tab/newline (strip + re-parse).
|
|
71
123
|
for (let i = start; i < indexOfProtocol; i += 1) {
|
|
72
|
-
const
|
|
73
|
-
if (!(((
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
124
|
+
const code = url.charCodeAt(i) | 32;
|
|
125
|
+
if (!(((code >= 97 && code <= 122) || // [a, z]
|
|
126
|
+
(code >= 48 && code <= 57) || // [0, 9]
|
|
127
|
+
code === 46 || // '.'
|
|
128
|
+
code === 45 || // '-'
|
|
129
|
+
code === 43) // '+'
|
|
78
130
|
)) {
|
|
131
|
+
const raw = url.charCodeAt(i);
|
|
132
|
+
if (raw === 9 || raw === 10 || raw === 13) {
|
|
133
|
+
return extractHostname(url.replace(CONTROL_CHARS, ''), urlIsValidHostname);
|
|
134
|
+
}
|
|
79
135
|
return null;
|
|
80
136
|
}
|
|
81
137
|
}
|
|
138
|
+
// A non-special scheme has an authority only after "//" (else it is an
|
|
139
|
+
// opaque path with no host). `indexOf(':/')` already gave the first '/'.
|
|
140
|
+
if (url.charCodeAt(indexOfProtocol + 2) === 47 /* '/' */) {
|
|
141
|
+
start = indexOfProtocol + 3;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else if (url.charCodeAt(start) !== 91 /* '[' */) {
|
|
149
|
+
// Cold path: no scheme "://", and not a bare IPv6 literal (whose first
|
|
150
|
+
// ':' would otherwise look like a scheme separator; "[…]" falls through
|
|
151
|
+
// to the ipv6 handling below). May be a bare host, a host:port, a
|
|
152
|
+
// user@host, a slash-less special scheme ("https:host"), or an opaque
|
|
153
|
+
// URI ("mailto:", "tel:", "urn:…").
|
|
154
|
+
let indexOfColon = -1;
|
|
155
|
+
for (let i = start; i < end; i += 1) {
|
|
156
|
+
const code = url.charCodeAt(i);
|
|
157
|
+
if (code === 9 || code === 10 || code === 13) {
|
|
158
|
+
return extractHostname(url.replace(CONTROL_CHARS, ''), urlIsValidHostname);
|
|
159
|
+
}
|
|
160
|
+
if (code === 58 /* ':' */) {
|
|
161
|
+
indexOfColon = i;
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
if (code === 47 || code === 92 || code === 63 || code === 35) {
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
82
167
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
168
|
+
if (indexOfColon !== -1) {
|
|
169
|
+
// An '@' before the next delimiter => the ':' is userinfo, not a
|
|
170
|
+
// scheme ("user:pass@host", "mailto:a@b"): keep the whole authority.
|
|
171
|
+
let hasIdentifier = false;
|
|
172
|
+
for (let i = indexOfColon + 1; i < end; i += 1) {
|
|
173
|
+
const code = url.charCodeAt(i);
|
|
174
|
+
if (code === 47 || code === 92 || code === 63 || code === 35) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
if (code === 64 /* '@' */) {
|
|
178
|
+
hasIdentifier = true;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!hasIdentifier) {
|
|
183
|
+
// All-digits after ':' => a bare "host:port" (tldts accepts
|
|
184
|
+
// hostnames too); keep `start` and let the port handling trim it.
|
|
185
|
+
let allDigits = true;
|
|
186
|
+
let i = indexOfColon + 1;
|
|
187
|
+
for (; i < end; i += 1) {
|
|
188
|
+
const code = url.charCodeAt(i);
|
|
189
|
+
if (code === 47 || code === 92 || code === 63 || code === 35) {
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
if (code < 48 /* '0' */ || code > 57 /* '9' */) {
|
|
193
|
+
allDigits = false;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (i === indexOfColon + 1) {
|
|
198
|
+
allDigits = false; // nothing after ':' => not a port
|
|
199
|
+
}
|
|
200
|
+
if (!allDigits) {
|
|
201
|
+
const special = getSpecialScheme(url, start, indexOfColon);
|
|
202
|
+
if (special === 0) {
|
|
203
|
+
// No "://" anywhere on the cold path, so a non-special scheme has
|
|
204
|
+
// no authority: opaque path, no host ("mailto:x", "foo:bar").
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
isSpecial = true;
|
|
208
|
+
start = indexOfColon + 1;
|
|
209
|
+
if (special === 2) {
|
|
210
|
+
// file (e.g. "file:\\host"): host only between "//" and next slash.
|
|
211
|
+
let slashes = 0;
|
|
212
|
+
while ((url.charCodeAt(start) === 47 ||
|
|
213
|
+
url.charCodeAt(start) === 92) &&
|
|
214
|
+
slashes < 2) {
|
|
215
|
+
start += 1;
|
|
216
|
+
slashes += 1;
|
|
217
|
+
}
|
|
218
|
+
if (slashes < 2) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
while (url.charCodeAt(start) === 47 ||
|
|
224
|
+
url.charCodeAt(start) === 92) {
|
|
225
|
+
start += 1;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
87
230
|
}
|
|
88
231
|
}
|
|
89
232
|
}
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
233
|
+
// Find the host's end: first '/', '?' or '#' (and '\' for special URLs,
|
|
234
|
+
// which WHATWG treats like '/'). Track the last '@', ']' and ':' for
|
|
235
|
+
// userinfo, ipv6 and port; flag uppercase and a stray tab/newline. The loop
|
|
236
|
+
// is split on `code < 64` so common host characters take fewer comparisons.
|
|
93
237
|
let indexOfIdentifier = -1;
|
|
94
238
|
let indexOfClosingBracket = -1;
|
|
95
239
|
let indexOfPort = -1;
|
|
240
|
+
let hasControl = false;
|
|
96
241
|
for (let i = start; i < end; i += 1) {
|
|
97
242
|
const code = url.charCodeAt(i);
|
|
98
|
-
if (code
|
|
99
|
-
code === 47 ||
|
|
100
|
-
|
|
101
|
-
|
|
243
|
+
if (code < 64) {
|
|
244
|
+
if (code === 47 || code === 35 || code === 63) {
|
|
245
|
+
end = i;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
else if (code === 58 /* ':' */) {
|
|
249
|
+
indexOfPort = i;
|
|
250
|
+
}
|
|
251
|
+
else if (code === 9 || code === 10 || code === 13) {
|
|
252
|
+
hasControl = true;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else if (isSpecial && code === 92 /* '\' */) {
|
|
102
256
|
end = i;
|
|
103
257
|
break;
|
|
104
258
|
}
|
|
105
|
-
else if (code === 64) {
|
|
106
|
-
// '@'
|
|
259
|
+
else if (code === 64 /* '@' */) {
|
|
107
260
|
indexOfIdentifier = i;
|
|
108
261
|
}
|
|
109
|
-
else if (code === 93) {
|
|
110
|
-
// ']'
|
|
262
|
+
else if (code === 93 /* ']' */) {
|
|
111
263
|
indexOfClosingBracket = i;
|
|
112
264
|
}
|
|
113
|
-
else if (code === 58) {
|
|
114
|
-
// ':'
|
|
115
|
-
indexOfPort = i;
|
|
116
|
-
}
|
|
117
265
|
else if (code >= 65 && code <= 90) {
|
|
118
266
|
hasUpper = true;
|
|
119
267
|
}
|
|
120
268
|
}
|
|
121
|
-
//
|
|
269
|
+
// A tab/newline inside the authority: strip everything and re-parse (rare).
|
|
270
|
+
if (hasControl) {
|
|
271
|
+
return extractHostname(url.replace(CONTROL_CHARS, ''), urlIsValidHostname);
|
|
272
|
+
}
|
|
273
|
+
// Skip userinfo. '>= start' so an empty userinfo ("http://@host") works too.
|
|
122
274
|
if (indexOfIdentifier !== -1 &&
|
|
123
|
-
indexOfIdentifier
|
|
275
|
+
indexOfIdentifier >= start &&
|
|
124
276
|
indexOfIdentifier < end) {
|
|
125
277
|
start = indexOfIdentifier + 1;
|
|
126
278
|
}
|
|
127
|
-
// Handle ipv6 addresses
|
|
128
279
|
if (url.charCodeAt(start) === 91 /* '[' */) {
|
|
280
|
+
// ipv6 address: return what is between the brackets, or null if unclosed.
|
|
129
281
|
if (indexOfClosingBracket !== -1) {
|
|
130
282
|
return url.slice(start + 1, indexOfClosingBracket).toLowerCase();
|
|
131
283
|
}
|
|
132
284
|
return null;
|
|
133
285
|
}
|
|
134
286
|
else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) {
|
|
135
|
-
//
|
|
136
|
-
|
|
287
|
+
end = indexOfPort; // trim ':port'
|
|
288
|
+
}
|
|
289
|
+
// Empty authority ("http://", "file:///path", "//"); only reachable here via
|
|
290
|
+
// extraction — a bare valid hostname never lands here.
|
|
291
|
+
if (start >= end) {
|
|
292
|
+
return null;
|
|
137
293
|
}
|
|
138
294
|
}
|
|
139
295
|
// Trim trailing dots
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-hostname.js","sourceRoot":"","sources":["../../../src/extract-hostname.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extract-hostname.js","sourceRoot":"","sources":["../../../src/extract-hostname.ts"],"names":[],"mappings":";;AA8DA,kCA6QC;AA3UD;;;;GAIG;AACH,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC;;;;;;;;GAQG;AACH,SAAS,gBAAgB,CACvB,GAAW,EACX,WAAmB,EACnB,UAAkB;IAElB,MAAM,MAAM,GAAG,UAAU,GAAG,WAAW,CAAC;IACxC,MAAM,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;IAC5C,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QACjB,OAAO,EAAE,KAAK,GAAG,IA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AAC,KAAK,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,WAAW,EAAE,CAAC;YACnE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,WAAW,KAAK,CAAC,CAAC,IAAI,WAAW,GAAG,KAAK,IAAI,WAAW,GAAG,GAAG,EAAE,CAAC;YAC1E,GAAG,GAAG,WAAW,CAAC,CAAC,eAAe;QACpC,CAAC;QAED,6EAA6E;QAC7E,uDAAuD;QACvD,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,qBAAqB;IACrB,OAAO,GAAG,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,CAAC;QACnE,GAAG,IAAI,CAAC,CAAC;IACX,CAAC;IAED,MAAM,QAAQ,GACZ,KAAK,KAAK,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAElE,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/cjs/src/factory.js
CHANGED
|
@@ -55,11 +55,16 @@ function parseImpl(url, step, suffixLookup, partialOptions, result) {
|
|
|
55
55
|
// set to `false` to speed-up parsing. If only URLs are expected then
|
|
56
56
|
// `mixedInputs` can be set to `false`. The `mixedInputs` is only a hint
|
|
57
57
|
// and will not change the behavior of the library.
|
|
58
|
+
// Whether `url` itself was already a valid hostname (only computed on the
|
|
59
|
+
// mixedInputs path). Lets us skip the post-extraction validation below when
|
|
60
|
+
// extractHostname returned `url` unchanged (same reference).
|
|
61
|
+
let urlIsValid = false;
|
|
58
62
|
if (!options.extractHostname) {
|
|
59
63
|
result.hostname = url;
|
|
60
64
|
}
|
|
61
65
|
else if (options.mixedInputs) {
|
|
62
|
-
|
|
66
|
+
urlIsValid = (0, is_valid_1.default)(url);
|
|
67
|
+
result.hostname = (0, extract_hostname_1.default)(url, urlIsValid);
|
|
63
68
|
}
|
|
64
69
|
else {
|
|
65
70
|
result.hostname = (0, extract_hostname_1.default)(url, false);
|
|
@@ -78,6 +83,9 @@ function parseImpl(url, step, suffixLookup, partialOptions, result) {
|
|
|
78
83
|
if (options.validateHostname &&
|
|
79
84
|
options.extractHostname &&
|
|
80
85
|
result.hostname !== null &&
|
|
86
|
+
// Skip the re-scan when `url` was already validated and extractHostname
|
|
87
|
+
// returned it unchanged (same reference => identical string, still valid).
|
|
88
|
+
!(urlIsValid && result.hostname === url) &&
|
|
81
89
|
!(0, is_valid_1.default)(result.hostname)) {
|
|
82
90
|
result.hostname = null;
|
|
83
91
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/factory.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAgCH,wCAWC;AAED,kCASC;AAeD,
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/factory.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAgCH,wCAWC;AAED,kCASC;AAeD,8BAiGC;AApKD,qCAAiC;AACjC,mEAA6D;AAC7D,yDAAiD;AACjD,mCAA2B;AAC3B,yCAAyC;AAEzC,uCAAkD;AAClD,2CAAuC;AAuBvC,SAAgB,cAAc;IAC5B,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,mBAAmB,EAAE,IAAI;QACzB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,IAAI;KAChB,CAAC;AACJ,CAAC;AAED,SAAgB,WAA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