UNPKG

data-provider-temporary

Version:

Library that helps with server-to-client synchronization of data

15 lines (11 loc) 390 B
//generate a dom var handler = new (require("domhandler"))(); (new (require("htmlparser2").Parser)(handler)).parseComplete( Array(21).join("<?xml><tag1 id='asdf'> <script>text</script> <!-- comment --> <tag2> text </tag1>") ); var dom = handler.dom; exports.dir = "/DomUtils/"; exports.test = function(test, cb){ cb(null, test.getElements(dom)); cb(null, test.getByFunction(dom)); };