(url, parseQueryString, slashesDenoteHost)
| 132 | let urlParseWarned = false; |
| 133 | |
| 134 | function urlParse(url, parseQueryString, slashesDenoteHost) { |
| 135 | if (!urlParseWarned && !isInsideNodeModules(4)) { |
| 136 | urlParseWarned = true; |
| 137 | process.emitWarning( |
| 138 | '`url.parse()` behavior is not standardized and prone to ' + |
| 139 | 'errors that have security implications. Use the WHATWG URL API ' + |
| 140 | 'instead. CVEs are not issued for `url.parse()` vulnerabilities.', |
| 141 | 'DeprecationWarning', |
| 142 | 'DEP0169', |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | if (url instanceof Url) return url; |
| 147 | |
| 148 | const urlObject = new Url(); |
| 149 | urlObject.parse(url, parseQueryString, slashesDenoteHost); |
| 150 | return urlObject; |
| 151 | } |
| 152 | |
| 153 | function isIpv6Hostname(hostname) { |
| 154 | return ( |
no test coverage detected
searching dependent graphs…