* Validate user-input in `context` supplied by a custom loader. * @param {string | URL | undefined} parentURL - The parent URL. * @returns {void}
(parentURL)
| 941 | * @returns {void} |
| 942 | */ |
| 943 | function throwIfInvalidParentURL(parentURL) { |
| 944 | if (parentURL === undefined) { |
| 945 | return; // Main entry point, so no parent |
| 946 | } |
| 947 | if (typeof parentURL !== 'string' && !isURL(parentURL)) { |
| 948 | throw new ERR_INVALID_ARG_TYPE('parentURL', ['string', 'URL'], parentURL); |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | /** |
| 953 | * Resolves the given specifier using the provided context, which includes the parent URL and conditions. |
no test coverage detected