* Converts a URL to a file path if the URL protocol is 'file:'. * @param {string} url - The URL to convert. * @returns {string|URL}
(url)
| 69 | * @returns {string|URL} |
| 70 | */ |
| 71 | function errPath(url) { |
| 72 | const parsed = new URL(url); |
| 73 | if (parsed.protocol === 'file:') { |
| 74 | return fileURLToPath(parsed); |
| 75 | } |
| 76 | return url; |
| 77 | } |
| 78 | |
| 79 | // Strategy for loading a standard JavaScript module. |
| 80 | translators.set('module', function moduleStrategy(url, translateContext, parentURL) { |
no test coverage detected
searching dependent graphs…