MCPcopy Index your code
hub / github.com/nodejs/node / urlParse

Function urlParse

lib/url.js:134–151  ·  view source on GitHub ↗
(url, parseQueryString, slashesDenoteHost)

Source from the content-addressed store, hash-verified

132let urlParseWarned = false;
133
134function 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
153function isIpv6Hostname(hostname) {
154 return (

Callers 4

urlFormatFunction · 0.85
urlResolveFunction · 0.85
url.jsFile · 0.85
urlResolveObjectFunction · 0.85

Calls 2

isInsideNodeModulesFunction · 0.85
parseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…