Sha256: 0207308431d14e39712f2d2fede5e84240ab48e97dde2d1b4f290545acb56f91
Contents?: true
Size: 501 Bytes
Versions: 26
Compression:
Stored size: 501 Bytes
Contents
import { isAbsoluteUrl } from './isAbsoluteUrl.mjs'; function getAbsoluteUrl(path, baseUrl) { if (isAbsoluteUrl(path)) { return path; } if (path.startsWith("*")) { return path; } const origin = baseUrl || typeof document !== "undefined" && document.baseURI; return origin ? ( // Encode and decode the path to preserve escaped characters. decodeURI(new URL(encodeURI(path), origin).href) ) : path; } export { getAbsoluteUrl }; //# sourceMappingURL=getAbsoluteUrl.mjs.map
Version data entries
26 entries across 26 versions & 1 rubygems