{
"name": "htmlparser2",
"description": "Fast & forgiving HTML/XML/RSS parser",
"version": "3.7.2",
"author": {
"name": "Felix Boehm",
"email": "me@feedic.com"
},
"keywords": [
"html",
"parser",
"streams",
"xml",
"dom",
"rss",
"feed",
"atom"
],
"repository": {
"type": "git",
"url": "git://github.com/fb55/htmlparser2.git"
},
"bugs": {
"url": "http://github.com/fb55/htmlparser2/issues"
},
"directories": {
"lib": "lib/"
},
"main": "lib/index.js",
"scripts": {
"lcov": "istanbul cover _mocha --report lcovonly -- -R spec",
"coveralls": "npm run lint && npm run lcov && (cat coverage/lcov.info | coveralls || exit 0)",
"test": "mocha && npm run lint",
"lint": "jshint {lib,test}/*.js test/*/*.js"
},
"dependencies": {
"domhandler": "2.2",
"domutils": "1.5",
"domelementtype": "1",
"readable-stream": "1.1",
"entities": "1.0"
},
"devDependencies": {
"mocha": "1",
"mocha-lcov-reporter": "*",
"coveralls": "*",
"istanbul": "*",
"jshint": "2"
},
"license": "MIT",
"jshintConfig": {
"eqeqeq": true,
"freeze": true,
"latedef": "nofunc",
"noarg": true,
"nonbsp": true,
"quotmark": "double",
"undef": true,
"unused": true,
"trailing": true,
"eqnull": true,
"proto": true,
"smarttabs": true,
"node": true,
"globals": {
"describe": true,
"it": true
}
},
"readme": "#htmlparser2 [](https://npmjs.org/package/htmlparser2) [](https://npmjs.org/package/htmlparser2)\n\n[](http://travis-ci.org/fb55/htmlparser2) [](https://coveralls.io/r/fb55/htmlparser2)\n\nA forgiving HTML/XML/RSS parser written in JS for NodeJS. The parser can handle streams (chunked data) and supports custom handlers for writing custom DOMs/output.\n\n##Installing\n\tnpm install htmlparser2\n\t\nA live demo of htmlparser2 is available at http://demos.forbeslindesay.co.uk/htmlparser2/\n\n##Usage\n\n```javascript\nvar htmlparser = require(\"htmlparser2\");\nvar parser = new htmlparser.Parser({\n\tonopentag: function(name, attribs){\n\t\tif(name === \"script\" && attribs.type === \"text/javascript\"){\n\t\t\tconsole.log(\"JS! Hooray!\");\n\t\t}\n\t},\n\tontext: function(text){\n\t\tconsole.log(\"-->\", text);\n\t},\n\tonclosetag: function(tagname){\n\t\tif(tagname === \"script\"){\n\t\t\tconsole.log(\"That's it?!\");\n\t\t}\n\t}\n});\nparser.write(\"Xyz