packages/extension-map/doc/webpacks/shexmap-webapp.js
// or retrieves a function that expands an existing prefix (if no IRI was specified)
or retrieves a function that expands an existing prefix (if no IRI was specified)
or retrieves a function that expands an existing prefix ( if no IRI was specified )
function processPrefix(prefix, iri) {
    if (typeof iri === 'string') {
      const cache = Object.create(null);
      prefixes[prefix] = local => {
        return cache[local] || (cache[local] = factory.namedNode(iri + local));
      };
    } else if (!(prefix in prefixes)) {
      throw new Error(`Unknown prefix: ${prefix}`);
    }
    return prefixes[prefix];
  }
function processPrefix ( prefix , iri ) { if ( typeof iri === 'string' ) { const cache = Object . create ( null ) ; prefixes [ prefix ] = local => { return cache [ local ] || ( cache [ local ] = factory . namedNode ( iri + local ) ) ; } ; } else if ( ! ( prefix in prefixes ) ) { throw new Error ( ` ${ prefix } ` ) ; } return prefixes [ prefix ] ; }
or retrieves a function that expands an existing prefix (if no IRI was specified)
or retrieves a function that expands an existing prefix ( if no IRI was specified )
// Create a new prefix if an IRI is specified or the prefix doesn't exist // Create a function that expands the prefix