packages/extension-map/doc/webpacks/shexmap-webapp.js
/* parseTurtle999 - a variant of parseTurtle with no callback.
   * so, which is "better"?
   */
a variant of parseTurtle with no callback.
a variant of parseTurtle with no callback .
function parseTurtle999 (text, mediaType, url, data, meta, dataOptions) {
    try {
      const p = new config.rdfjs.Parser({baseIRI: url, blankNodePrefix: "", format: "text/turtle"})
      const triples = p.parse(text)
      meta.prefixes = p._prefixes
      meta.base = p._base
      data.addPrefixes(p._prefixes)
      data.addTriples(triples)
      return Promise.resolve([mediaType, url])
    } catch (e) {
      return Promise.reject(Error("error parsing " + url + ": " + e))
    }
  }
function parseTurtle999 ( text , mediaType , url , data , meta , dataOptions ) { try { const p = new config . rdfjs . Parser ( { baseIRI : url , blankNodePrefix : "" , format : "text/turtle" } ) const triples = p . parse ( text ) meta . prefixes = p . _prefixes meta . base = p . _base data . addPrefixes ( p . _prefixes ) data . addTriples ( triples ) return Promise . resolve ( [ mediaType , url ] ) } catch ( e ) { return Promise . reject ( Error ( "error parsing " + url + ": " + e ) ) } }
parseTurtle999 - a variant of parseTurtle with no callback.
parseTurtle999 - a variant of parseTurtle with no callback .