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

Function isURL

lib/internal/url.js:792–794  ·  view source on GitHub ↗

* Checks if a value has the shape of a WHATWG URL object. * * Using a symbol or instanceof would not be able to recognize URL objects * coming from other implementations (e.g. in Electron), so instead we are * checking some well known properties for a lack of a better test. * * We use `href` a

(self)

Source from the content-addressed store, hash-verified

790 * @returns {self is URL}
791 */
792function isURL(self) {
793 return Boolean(self?.href && self.protocol && self.auth === undefined && self.path === undefined);
794}
795
796/**
797 * A unique symbol used as a private identifier to safely invoke the URL constructor

Callers 7

fileURLToPathFunction · 0.70
fileURLToPathBufferFunction · 0.70
toPathIfFileURLFunction · 0.70
constructorMethod · 0.70
ClientRequestFunction · 0.50
requestFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…