{"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"keywords":["dom","htmlparser2"],"dist-tags":{"latest":"2.4.1"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"description":"handler for htmlparser2 that turns pages into a dom","readme":"# domhandler [![Build Status](https://travis-ci.org/fb55/domhandler.svg?branch=master)](https://travis-ci.org/fb55/domhandler)\n\nThe DOM handler (formally known as DefaultHandler) creates a tree containing all nodes of a page. The tree may be manipulated using the [domutils](https://github.com/fb55/domutils) library.\n\n## Usage\n```javascript\nvar handler = new DomHandler([ <func> callback(err, dom), ] [ <obj> options ]);\n// var parser = new Parser(handler[, options]);\n```\n\nAvailable options are described below.\n\n## Example\n```javascript\nvar htmlparser = require(\"htmlparser2\");\nvar rawHtml = \"Xyz <script language= javascript>var foo = '<<bar>>';< /  script><!--<!-- Waah! -- -->\";\nvar handler = new htmlparser.DomHandler(function (error, dom) {\n    if (error)\n    \t[...do something for errors...]\n    else\n    \t[...parsing done, do something...]\n        console.log(dom);\n});\nvar parser = new htmlparser.Parser(handler);\nparser.write(rawHtml);\nparser.end();\n```\n\nOutput:\n\n```javascript\n[{\n    data: 'Xyz ',\n    type: 'text'\n}, {\n    type: 'script',\n    name: 'script',\n    attribs: {\n    \tlanguage: 'javascript'\n    },\n    children: [{\n    \tdata: 'var foo = \\'<bar>\\';<',\n    \ttype: 'text'\n    }]\n}, {\n    data: '<!-- Waah! -- ',\n    type: 'comment'\n}]\n```\n\n## Option: normalizeWhitespace\nIndicates whether the whitespace in text nodes should be normalized (= all whitespace should be replaced with single spaces). The default value is \"false\". \n\nThe following HTML will be used:\n\n```html\n<font>\n\t<br>this is the text\n<font>\n```\n\n### Example: true\n\n```javascript\n[{\n    type: 'tag',\n    name: 'font',\n    children: [{\n    \tdata: ' ',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'br'\n    }, {\n    \tdata: 'this is the text ',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'font'\n    }]\n}]\n```\n\n### Example: false\n\n```javascript\n[{\n    type: 'tag',\n    name: 'font',\n    children: [{\n    \tdata: '\\n\\t',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'br'\n    }, {\n    \tdata: 'this is the text\\n',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'font'\n    }]\n}]\n```\n\n## Option: withDomLvl1\n\nAdds DOM level 1 properties to all elements.\n\n<!-- TODO: description -->\n\n## Option: withStartIndices\nIndicates whether a `startIndex` property will be added to nodes. When the parser is used in a non-streaming fashion, `startIndex` is an integer indicating the position of the start of the node in the document. The default value is \"false\".\n\n## Option: withEndIndices\nIndicates whether a `endIndex` property will be added to nodes. When the parser is used in a non-streaming fashion, `endIndex` is an integer indicating the position of the end of the node in the document. The default value is \"false\".\n","repository":{"type":"git","url":"git://github.com/fb55/DomHandler.git"},"users":{"gonprazeres":true,"mojaray2k":true,"tsxuehu":true,"scott.m.sarsfield":true},"bugs":{"url":"https://github.com/fb55/DomHandler/issues"},"license":"BSD-2-Clause","versions":{"1.0.0":{"name":"domhandler","version":"1.0.0","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.0.0","dist":{"shasum":"a7d75c9eee3b87814305770c787ae9b626c57842","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.0.0.tgz"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.0.1":{"name":"domhandler","version":"1.0.1","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.0.1","dist":{"shasum":"0815fde05d5767a0c774ce8d37e4444381d5e499","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.0.1.tgz"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.1.0":{"name":"domhandler","version":"1.1.0","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.1.0","dist":{"shasum":"f60d691dfed25ca26aef3538f47d2cc081cdf95d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.1.0.tgz"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.2.0":{"name":"domhandler","version":"1.2.0","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.2.0","dist":{"shasum":"a21967803f677971c629db13c4b883424096a3d5","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.2.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.3.0":{"name":"domhandler","version":"1.3.0","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.3.0","dist":{"shasum":"78b2b8d433039ad0fdd1923213a5d1776a089cca","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.3.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.3.1":{"name":"domhandler","version":"1.3.1","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.3.1","dist":{"shasum":"9421ba3ea870bfeebe117cfa02d967bc346b02af","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.3.1.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"1.3.2":{"name":"domhandler","version":"1.3.2","description":"htmlparser2's dom as a separate module","main":"lib/index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@1.3.2","dist":{"shasum":"b7627a0de883fa83db9e5217d2cfb11d58f4746e","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-1.3.2.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.0.0":{"name":"domhandler","version":"2.0.0","description":"htmlparser2's dom as a separate module","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@2.0.0","dist":{"shasum":"231dd23a1f5b4d1c6a04b19a90e93ef40ff55681","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.0.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.0.1":{"name":"domhandler","version":"2.0.1","description":"htmlparser2's dom as a separate module","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"node tests/00-runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@2.0.1","dist":{"shasum":"c968e41b1bc7bc15d55fbb6811a84ef5ca15e5de","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.0.1.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.0.2":{"name":"domhandler","version":"2.0.2","description":"htmlparser2's dom as a separate module","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"node runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@2.0.2","dist":{"shasum":"ca597f42c440173c64d80d838cca738164f1b5ac","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.0.2.tgz"},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.0.3":{"name":"domhandler","version":"2.0.3","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"node runtests.js"},"repository":{"type":"git","url":"git://github.com/FB55/domhandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"2.3"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"_id":"domhandler@2.0.3","dist":{"shasum":"889f8df626403af0788e29d66d5d5c6f7ebf0fd6","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.0.3.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.1.0":{"name":"domhandler","version":"2.1.0","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list"},"repository":{"type":"git","url":"git://github.com/fb55/domhandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"2.3","mocha":"1"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"bugs":{"url":"https://github.com/fb55/domhandler/issues"},"_id":"domhandler@2.1.0","dist":{"shasum":"d2646f5e57f6c3bab11cf6cb05d3c0acf7412594","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.1.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.2.0":{"name":"domhandler","version":"2.2.0","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list && jshint index.js test/"},"repository":{"type":"git","url":"git://github.com/fb55/domhandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"3.2","mocha":"1","jshint":"~2.3.0"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"jshintConfig":{"quotmark":"double","trailing":true,"unused":true,"undef":true,"node":true,"proto":true,"globals":{"it":true}},"bugs":{"url":"https://github.com/fb55/domhandler/issues"},"homepage":"https://github.com/fb55/domhandler","_id":"domhandler@2.2.0","dist":{"shasum":"ac9febfa988034b43f78ba056ebf7bd373416476","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.2.0.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}]},"2.2.1":{"name":"domhandler","version":"2.2.1","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list && jshint index.js test/"},"repository":{"type":"git","url":"git://github.com/fb55/DomHandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"3.2","mocha":"1","jshint":"~2.3.0"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"jshintConfig":{"quotmark":"double","trailing":true,"unused":true,"undef":true,"node":true,"proto":true,"globals":{"it":true}},"gitHead":"3b4885326dbbc85b71094fc988b93efb9c926b08","bugs":{"url":"https://github.com/fb55/DomHandler/issues"},"homepage":"https://github.com/fb55/DomHandler","_id":"domhandler@2.2.1","_shasum":"59df9dcd227e808b365ae73e1f6684ac3d946fc2","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"dist":{"shasum":"59df9dcd227e808b365ae73e1f6684ac3d946fc2","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.2.1.tgz"}},"2.3.0":{"name":"domhandler","version":"2.3.0","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list && jshint index.js test/"},"repository":{"type":"git","url":"git://github.com/fb55/DomHandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"3.8","mocha":"1","jshint":"~2.3.0"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"jshintConfig":{"quotmark":"double","trailing":true,"unused":true,"undef":true,"node":true,"proto":true,"globals":{"it":true}},"gitHead":"9c224be43a43bc54ebfc2d2e47ab3b9f97836cb2","bugs":{"url":"https://github.com/fb55/DomHandler/issues"},"homepage":"https://github.com/fb55/DomHandler","_id":"domhandler@2.3.0","_shasum":"2de59a0822d5027fabff6f032c2b25a2a8abe738","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"feedic","email":"me@feedic.com"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"dist":{"shasum":"2de59a0822d5027fabff6f032c2b25a2a8abe738","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.3.0.tgz"}},"2.4.0":{"name":"domhandler","version":"2.4.0","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list && jshint index.js test/"},"repository":{"type":"git","url":"git://github.com/fb55/DomHandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"^3.9.0","mocha":"^3.0.2","jshint":"^2.9.1"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","jshintConfig":{"quotmark":"double","trailing":true,"unused":true,"undef":true,"node":true,"proto":true,"globals":{"it":true}},"gitHead":"bed1062f836e545d6a1666b907b2574dbf6369fb","bugs":{"url":"https://github.com/fb55/DomHandler/issues"},"homepage":"https://github.com/fb55/DomHandler#readme","_id":"domhandler@2.4.0","_shasum":"d37bd99a1367a4000b0d9cd9548c9d6aaabfd35c","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.9.0","_npmUser":{"name":"feedic","email":"me@feedic.com"},"dist":{"shasum":"d37bd99a1367a4000b0d9cd9548c9d6aaabfd35c","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.4.0.tgz"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/domhandler-2.4.0.tgz_1494125310939_0.8457358016166836"}},"2.4.1":{"name":"domhandler","version":"2.4.1","description":"handler for htmlparser2 that turns pages into a dom","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha -R list && jshint index.js test/"},"repository":{"type":"git","url":"git://github.com/fb55/DomHandler.git"},"keywords":["dom","htmlparser2"],"dependencies":{"domelementtype":"1"},"devDependencies":{"htmlparser2":"^3.9.0","mocha":"^3.0.2","jshint":"^2.9.1"},"author":{"name":"Felix Boehm","email":"me@feedic.com"},"license":"BSD-2-Clause","jshintConfig":{"quotmark":"double","trailing":true,"unused":true,"undef":true,"node":true,"proto":true,"globals":{"it":true}},"gitHead":"9b17cc6cc9387a87dde6eb8ddbae11c753e7d23d","bugs":{"url":"https://github.com/fb55/DomHandler/issues"},"homepage":"https://github.com/fb55/DomHandler#readme","_id":"domhandler@2.4.1","_shasum":"892e47000a99be55bbf3774ffea0561d8879c259","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.9.0","_npmUser":{"name":"feedic","email":"me@feedic.com"},"dist":{"shasum":"892e47000a99be55bbf3774ffea0561d8879c259","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/domhandler/-/domhandler-2.4.1.tgz"},"maintainers":[{"name":"feedic","email":"me@feedic.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/domhandler-2.4.1.tgz_1494125946418_0.981079070828855"}}},"name":"domhandler","time":{"modified":"2017-05-08T23:58:59.119Z","created":"2012-08-14T14:57:01.877Z","1.0.0":"2012-08-14T14:57:14.272Z","1.0.1":"2012-08-15T09:27:06.055Z","1.1.0":"2012-08-23T18:39:01.597Z","1.2.0":"2012-09-09T22:27:47.293Z","1.3.0":"2012-09-22T12:06:18.201Z","1.3.1":"2012-09-22T12:17:04.700Z","1.3.2":"2012-09-23T11:24:54.321Z","2.0.0":"2012-11-10T13:53:25.346Z","2.0.1":"2012-11-10T14:03:04.229Z","2.0.2":"2013-02-17T21:34:38.441Z","2.0.3":"2013-04-15T14:06:53.530Z","2.1.0":"2013-09-04T13:53:30.048Z","2.2.0":"2013-12-12T14:14:39.358Z","2.2.1":"2014-10-30T11:05:12.890Z","2.3.0":"2014-11-04T19:06:15.413Z","2.4.0":"2017-05-07T02:48:31.220Z","2.4.1":"2017-05-07T02:59:06.685Z"},"readmeFilename":"readme.md","homepage":"https://github.com/fb55/DomHandler#readme"}