dockerized_openAger/nodered/rootfs/data/node_modules/domutils/test/utils.js

10 lines
229 B
JavaScript
Raw Normal View History

2020-10-17 16:42:50 +00:00
var htmlparser = require("htmlparser2");
exports.makeDom = function(markup) {
var handler = new htmlparser.DomHandler(),
parser = new htmlparser.Parser(handler);
parser.write(markup);
parser.done();
return handler.dom;
};