MCPcopy Index your code
hub / github.com/danmactough/node-feedparser / resolve

Function resolve

lib/utils.js:62–70  ·  view source on GitHub ↗
(baseUrl, pathUrl)

Source from the content-addressed store, hash-verified

60 * @private
61 */
62function resolve (baseUrl, pathUrl) {
63 if (!baseUrl || !pathUrl) return pathUrl;
64 if (typeof pathUrl !== 'string') return pathUrl;
65 try {
66 return new WHATWGURL(pathUrl, baseUrl).href;
67 } catch (e) {
68 return pathUrl;
69 }
70}
71
72/*
73 * Resolve the URLs in a srcset attribute value against a base URL.

Callers 6

resolveSrcsetCandidateFunction · 0.85
resolveLevelFunction · 0.85
onReadableFunction · 0.85
onEndFunction · 0.85
onErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected