(relativePath: string, umd = false)
| 26 | const getResolveUrl = (path: string, URL = 'URL') => `new ${URL}(${path}).href`; |
| 27 | |
| 28 | const getRelativeUrlFromDocument = (relativePath: string, umd = false) => |
| 29 | getResolveUrl( |
| 30 | `'${escapeId(partialEncodeURIPath(relativePath))}', ${ |
| 31 | umd ? `typeof document === 'undefined' ? location.href : ` : '' |
| 32 | }document.currentScript && document.currentScript.src || document.baseURI` |
| 33 | ); |
| 34 | |
| 35 | const getFileUrlFromFullPath = (path: string) => `require('u' + 'rl').pathToFileURL(${path}).href`; |
| 36 |
no test coverage detected