MCPcopy
hub / github.com/extractus/article-extractor / absolutify

Function absolutify

src/utils/linker.js:41–48  ·  view source on GitHub ↗
(fullUrl = '', relativeUrl = '')

Source from the content-addressed store, hash-verified

39 * @returns {string} Absolute URL or empty string on failure
40 */
41export const absolutify = (fullUrl = '', relativeUrl = '') => {
42 try {
43 const result = new URL(relativeUrl, fullUrl)
44 return result.toString()
45 } catch {
46 return ''
47 }
48}
49
50/**
51 * Tracking and analytics query parameters to strip from URLs.

Callers 1

normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…