Files
coopgo/node_modules/hast-util-to-mdast/lib/util/resolve.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

17 lines
307 B
JavaScript

'use strict'
module.exports = resolve
function resolve(h, url) {
if (url === null || url === undefined) {
return ''
}
/* istanbul ignore next - ignored for older Node */
if (h.frozenBaseUrl && typeof URL !== 'undefined') {
return String(new URL(url, h.frozenBaseUrl))
}
return url
}