This commit is contained in:
16
node_modules/hast-util-to-mdast/lib/util/resolve.js
generated
vendored
Normal file
16
node_modules/hast-util-to-mdast/lib/util/resolve.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'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
|
||||
}
|
||||
Reference in New Issue
Block a user