* 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)
| 790 | * @returns {self is URL} |
| 791 | */ |
| 792 | function 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…