extensions/shex-map/browser/shex-extension-map-browserify.js
// assuming that a base path has been set and that the IRI is indeed relative.
assuming that a base path has been set and that the IRI is indeed relative.
assuming that a base path has been set and that the IRI is indeed relative .
function resolveRelativeIRI (base, iri) {
    if (absoluteIRI.test(iri))
      return iri
    switch (iri[0]) {
    case undefined: return base;
    case '#': return base + iri;
    case '?': return base.replace(/(?:\?.*)?$/, iri);
    case '/':
      let m = base.match(schemeAuthority);
      return (iri[1] === '/' ? m[1] : m[0]) + _removeDotSegments(iri);
    default: {
      return _removeDotSegments(base.replace(/[^\/?]*(?:\?.*)?$/, '') + iri);
    }
    }
  }
function resolveRelativeIRI ( base , iri ) { if ( absoluteIRI . test ( iri ) ) return iri switch ( iri [ 0 ] ) { case undefined : return base ; case '#' : return base + iri ; case '?' : return base . replace ( / (?:\?.*)?$ / , iri ) ; case '/' : let m = base . match ( schemeAuthority ) ; return ( iri [ 1 ] === '/' ? m [ 1 ] : m [ 0 ] ) + _removeDotSegments ( iri ) ; default : { return _removeDotSegments ( base . replace ( / [^\/?]*(?:\?.*)?$ / , '' ) + iri ) ; } } }
assuming that a base path has been set and that the IRI is indeed relative.
assuming that a base path has been set and that the IRI is indeed relative .
// An empty relative IRI indicates the base IRI // Resolve relative fragment IRIs against the base IRI // Resolve relative query string IRIs by replacing the query string // Resolve root-relative IRIs at the root of the base IRI // Resolve scheme-relative IRIs to the scheme // Resolve all other IRIs at the base IRI's path