* Returns protocol if absolute URL specifier provided. * @param {string} specifier specifier * @returns {string | null | undefined} protocol if absolute URL specifier provided
(specifier)
| 79 | * @returns {string | null | undefined} protocol if absolute URL specifier provided |
| 80 | */ |
| 81 | function getProtocol(specifier) { |
| 82 | const scheme = getScheme(specifier); |
| 83 | return scheme === undefined ? undefined : `${scheme}:`; |
| 84 | } |
| 85 | |
| 86 | module.exports.getProtocol = getProtocol; |
| 87 | module.exports.getScheme = getScheme; |
no test coverage detected