packages/shex-validator/shex-validator.js
/* sparqlOrder - sort triples by subject following SPARQL partial ordering.
 */
sort triples by subject following SPARQL partial ordering.
sort triples by subject following SPARQL partial ordering .
function sparqlOrder (l, r) {
  const [lprec, rprec] = [l, r].map(
    x => ShExTerm.isBlank(x) ? 1 : ShExTerm.isLiteral(x) ? 2 : 3
  );
  return lprec === rprec ? l.localeCompare(r) : lprec - rprec;
}
function sparqlOrder ( l , r ) { const [ lprec , rprec ] = [ l , r ] . map ( x => ShExTerm . isBlank ( x ) ? 1 : ShExTerm . isLiteral ( x ) ? 2 : 3 ) ; return lprec === rprec ? l . localeCompare ( r ) : lprec - rprec ; }
sparqlOrder - sort triples by subject following SPARQL partial ordering.
sparqlOrder - sort triples by subject following SPARQL partial ordering .