MCPcopy Create free account
hub / github.com/nodejs/node / canParse

Method canParse

lib/internal/url.js:1162–1176  ·  view source on GitHub ↗
(url, base = undefined)

Source from the content-addressed store, hash-verified

1160 }
1161
1162 static canParse(url, base = undefined) {
1163 if (arguments.length === 0) {
1164 throw new ERR_MISSING_ARGS('url');
1165 }
1166
1167 url = `${url}`;
1168
1169 if (base !== undefined) {
1170 return bindingUrl.canParse(url, `${base}`);
1171 }
1172
1173 // It is important to differentiate the canParse call statements
1174 // since they resolve into different v8 fast api overloads.
1175 return bindingUrl.canParse(url);
1176 }
1177}
1178
1179ObjectDefineProperties(URL.prototype, {

Callers

nothing calls this directly

Calls 1

canParseMethod · 0.65

Tested by

no test coverage detected