Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},{}],"rdf2h":[function(require,module,exports){
/* global rdf, Mustache */
var rdf = require("rdf-ext");
var clownface = require("clownface");
var Mustache = require("mustache");
var Logger = require("./logger.js");
var NodeSet = require("./node-set.js");
rdf.setPrefix("r2h", "http://rdf2h.github.io/2015/rdf2h#");
function RDF2h(matcherGraph) {
RDF2h.logger.info("To see more debug output invoke RDF2h.logger.setLevel(Logger.DEBUG) or even RDF2h.logger.setLevel(Logger.TRACE)");
this.matcherGraph = matcherGraph;
var unorderedMatchers = new NodeSet();
var rdfTypeProperty = rdf.createNamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
var matcherType = rdf.createNamedNode("http://rdf2h.github.io/2015/rdf2h#Matcher");
var matcherStatements = matcherGraph.match(null, rdfTypeProperty, matcherType);
matcherStatements.forEach(function(t) {
unorderedMatchers.add(t.subject);
});
/*Sorting:
*
* Choose any matcher that is not the object of any before statement .
* Remove all before statements with that matcher as subject.
* Repeat till there are no more matchers that are not the object of a