{"_id":"hyntax-yx","_rev":"2169038","name":"hyntax-yx","description":"Straightforward HTML parser for Node.js and browser","dist-tags":{"latest":"1.0.8"},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"time":{"modified":"2022-01-05T02:56:50.000Z","created":"2020-02-23T03:54:37.110Z","1.0.8":"2021-09-27T09:34:55.124Z","1.0.7":"2021-09-23T02:27:32.540Z","1.0.6":"2021-09-22T15:03:17.983Z","1.0.5":"2021-09-22T14:31:40.366Z","1.0.4":"2021-07-30T06:41:12.559Z","1.0.3":"2021-06-11T08:43:53.652Z","1.0.2":"2021-06-11T08:31:43.465Z","1.0.1":"2021-06-09T08:34:38.432Z","1.0.0":"2021-02-03T04:45:29.689Z","0.0.1":"2020-02-23T03:54:37.110Z"},"users":{},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"versions":{"1.0.8":{"name":"hyntax-yx","version":"1.0.8","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"04f8486b7173fb717a4a642bd83582faadf38a29","_id":"hyntax-yx@1.0.8","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"8a6a106a73206fa760864f1732de0ace038887d0","size":670855,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.8.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.8_1632735294897_0.00922654034878101"},"_hasShrinkwrap":false,"publish_time":1632735295124,"_cnpm_publish_time":1632735295124},"1.0.7":{"name":"hyntax-yx","version":"1.0.7","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"6adeb2b6c617dcbbf4bcc982f9862357c0335221","_id":"hyntax-yx@1.0.7","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"92a53ec8d33a2780501b69e02f05a4d63b467a16","size":670718,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.7.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.7_1632364052315_0.14985584962041965"},"_hasShrinkwrap":false,"publish_time":1632364052540,"_cnpm_publish_time":1632364052540},"1.0.6":{"name":"hyntax-yx","version":"1.0.6","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"8405814af9c19512af36a7dfd8e51ef2080d904f","_id":"hyntax-yx@1.0.6","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"784eb5e25334ee117fe6751fa9b5c596af1d43a3","size":670707,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.6.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.6_1632322997784_0.26976256782634556"},"_hasShrinkwrap":false,"publish_time":1632322997983,"_cnpm_publish_time":1632322997983},"1.0.5":{"name":"hyntax-yx","version":"1.0.5","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"7210e85ff863d4e7aee93f815ac2e16e74de65dc","_id":"hyntax-yx@1.0.5","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"bcbc17efbf6c3dea46d38049753ee83df834403a","size":670656,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.5.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.5_1632321100166_0.6342301147270142"},"_hasShrinkwrap":false,"publish_time":1632321100366,"_cnpm_publish_time":1632321100366},"1.0.4":{"name":"hyntax-yx","version":"1.0.4","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"e9e02eab23d6eb5bb41990faa38ca5303c9776e9","_id":"hyntax-yx@1.0.4","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"85dc135b61fb94e5d1d17542624a35059ba3eec9","size":670461,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.4.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.4_1627627272310_0.05967123323893242"},"_hasShrinkwrap":false,"publish_time":1627627272559,"_cnpm_publish_time":1627627272559},"1.0.3":{"name":"hyntax-yx","version":"1.0.3","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"344a76e475e4e498ae3f4c8c0e040c3689e39d24","_id":"hyntax-yx@1.0.3","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"d776dd6d7af71a1fd2491bf1445950c5fa5c6095","size":670453,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.3.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.3_1623401033422_0.39077733811858795"},"_hasShrinkwrap":false,"publish_time":1623401033652,"_cnpm_publish_time":1623401033652},"1.0.2":{"name":"hyntax-yx","version":"1.0.2","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"e9406c57173e5695dc35d3819f8d9e8db43bf2cb","_id":"hyntax-yx@1.0.2","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"a54f9abdcf84eaa41aaab08a8a57a7f99954137b","size":670445,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.2.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.2_1623400303265_0.6815940273507866"},"_hasShrinkwrap":false,"publish_time":1623400303465,"_cnpm_publish_time":1623400303465},"1.0.1":{"name":"hyntax-yx","version":"1.0.1","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"a08680112635742a1c6df7058027c89cd88aed3b","_id":"hyntax-yx@1.0.1","_nodeVersion":"10.23.2","_npmVersion":"6.14.10","dist":{"shasum":"357354a65c7c98aa20ce81aed1b5a32c8021e443","size":670318,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.1.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.1_1623227678183_0.9635812786620626"},"_hasShrinkwrap":false,"publish_time":1623227678432,"_cnpm_publish_time":1623227678432},"1.0.0":{"name":"hyntax-yx","version":"1.0.0","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"8ae336af7a524c76c50fe2609a4e2df8d1c9fd6f","_id":"hyntax-yx@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"shasum":"fa5392753416bfbe9c5cc882fec9ae744bb68ccc","size":671864,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-1.0.0.tgz"},"_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"directories":{},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_1.0.0_1612327529451_0.9022262315676013"},"_hasShrinkwrap":false,"publish_time":1612327529689,"_cnpm_publish_time":1612327529689},"0.0.1":{"name":"hyntax-yx","version":"0.0.1","description":"Straightforward HTML parser for Node.js and browser","keywords":["html","parser","html5","html5 parser","htmlparser","html parser","html tree-constructor","html to JSON","html to AST","html tokenizer","tokenize","tokenizer","stream parsing","stream parser","typescript","types","node.js","node.js html parser"],"repository":{"type":"git","url":"git+ssh://git@github.com/nik-garmash/hyntax.git"},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"main":"./index.js","scripts":{"test":"tape ${TEST:-'./tests/**/*.test.js'} | tap-spec","coverage":"nyc -x 'tests/**/*' npm test","generate-readme-toc":"./generate-toc.js","prepublishOnly":"babel index.js --out-file index.es5.js && babel lib --out-dir lib-es5"},"author":{"name":"Nikolay Garmash","email":"garmash.nikolay@gmail.com","url":"https://nikgarmash.com"},"license":"MIT","private":false,"engines":{"node":">=6.11.1","npm":">=5.3.0"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","coveralls":"^3.0.5","deep-diff":"^0.3.8","eslint":"^6.3.0","nyc":"^14.1.1","remark":"^10.0.1","remark-toc":"^5.1.1","tap-spec":"^5.0.0","tape":"^4.11.0"},"gitHead":"33824c08e40f5e4da78c50adb090c4f1f0f45a9f","_id":"hyntax-yx@0.0.1","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"yexi","email":"1019996979@qq.com"},"dist":{"shasum":"f03f0901c4a96738d32400d3a850247750effe92","size":671862,"noattachment":false,"key":"/hyntax-yx/-/hyntax-yx-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/hyntax-yx/download/hyntax-yx-0.0.1.tgz"},"maintainers":[{"name":"yexi","email":"1019996979@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hyntax-yx_0.0.1_1582430076905_0.8241547226213268"},"_hasShrinkwrap":false,"publish_time":1582430077110,"_cnpm_publish_time":1582430077110}},"readme":"<p align=\"center\">\n\n<img src=\"./logo.png\" alt=\"Hyntax project logo — lego bricks in the shape of a capital letter H\" width=\"150\">\n\n</p>\n\n# Hyntax\n\nStraightforward HTML parser for JavaScript. [Live Demo](https://astexplorer.net/#/gist/6bf7f78077333cff124e619aebfb5b42/latest).\n\n-   **Simple.** API is straightforward, output is clear.\n-   **Forgiving.** Just like a browser, normally parses invalid HTML.\n-   **Supports streaming.** Can process HTML while it's still being loaded.\n-   **No dependencies.**\n\n\n\n## Table Of Contents\n\n-   [Usage](#usage)\n-   [TypeScript Typings](#typescript-typings)\n-   [Streaming](#streaming)\n-   [Tokens](#tokens)\n-   [AST Format](#ast-format)\n-   [API Reference](#api-reference)\n-   [Types Reference](#types-reference)\n\n\n\n## Usage\n\n```bash\nnpm install hyntax\n```\n\n```javascript\nconst { tokenize, constructTree } = require('hyntax')\nconst util = require('util')\n\nconst inputHTML = `\n<html>\n  <body>\n      <input type=\"text\" placeholder=\"Don't type\">\n      <button>Don't press</button>\n  </body>\n</html>\n`\n\nconst { tokens } = tokenize(inputHTML)\nconst { ast } = constructTree(tokens)\n\nconsole.log(JSON.stringify(tokens, null, 2))\nconsole.log(util.inspect(ast, { showHidden: false, depth: null }))\n```\n\n## TypeScript Typings\n\nHyntax is written in JavaScript but has [integrated TypeScript typings](./index.d.ts) to help you navigate around its data structures. There is also [Types Reference](#types-reference) which covers most common types.\n\n\n\n## Streaming\n\nUse `StreamTokenizer` and `StreamTreeConstructor` classes to parse HTML chunk by chunk while it's still being loaded from the network or read from the disk.\n\n```javascript\nconst { StreamTokenizer, StreamTreeConstructor } = require('hyntax')\nconst http = require('http')\nconst util = require('util')\n\nhttp.get('http://info.cern.ch', (res) => {\n  const streamTokenizer = new StreamTokenizer()\n  const streamTreeConstructor = new StreamTreeConstructor()\n\n  let resultTokens = []\n  let resultAst\n\n  res.pipe(streamTokenizer).pipe(streamTreeConstructor)\n\n  streamTokenizer\n    .on('data', (tokens) => {\n      resultTokens = resultTokens.concat(tokens)\n    })\n    .on('end', () => {\n      console.log(JSON.stringify(resultTokens, null, 2))\n    })\n\n  streamTreeConstructor\n    .on('data', (ast) => {\n      resultAst = ast\n    })\n    .on('end', () => {\n      console.log(util.inspect(resultAst, { showHidden: false, depth: null }))\n    })\n}).on('error', (err) => {\n  throw err;\n})\n```\n\n\n\n## Tokens\n\nHere are all kinds of tokens which Hyntax will extract out of HTML string.\n\n![Overview of all possible tokens](./tokens-list.png)\n\nEach token conforms to [Tokenizer.Token](#TokenizerToken) interface.\n\n\n\n## AST Format\n\nResulting syntax tree will have at least one top-level [Document Node](#ast-node-types) with optional children nodes nested within.\n\n<!-- You can play around with the [AST Explorer](https://astexplorer.net) to see how AST looks like. -->\n\n```javascript\n{\n  nodeType: TreeConstructor.NodeTypes.Document,\n  content: {\n    children: [\n      {\n        nodeType: TreeConstructor.NodeTypes.AnyNodeType,\n        content: {…}\n      },\n      {\n        nodeType: TreeConstructor.NodeTypes.AnyNodeType,\n        content: {…}\n      }\n    ]\n  }\n}\n```\n\nContent of each node is specific to node's type, all of them are described in [AST Node Types](#ast-node-types) reference.\n\n\n\n## API Reference\n\n### Tokenizer\n\nHyntax has its tokenizer as a separate module. You can use generated tokens on their own or pass them further to a tree constructor to build an AST.\n\n#### Interface\n\n```typescript\ntokenize(html: String): Tokenizer.Result\n```\n\n#### Arguments\n\n-   `html`  \nHTML string to process  \n  Required.  \nType: string.\n\n#### Returns [Tokenizer.Result](#TokenizerResult)\n\n### Tree Constructor\n\nAfter you've got an array of tokens, you can pass them into tree constructor to build an AST.\n\n#### Interface\n\n```typescript\nconstructTree(tokens: Tokenizer.AnyToken[]): TreeConstructor.Result\n```\n\n#### Arguments\n\n-   `tokens`  \nArray of tokens received from the tokenizer.  \n  Required.  \nType: [Tokenizer.AnyToken[]](#tokenizeranytoken)\n\n#### Returns [TreeConstructor.Result](#TreeConstructorResult)\n\n\n\n## Types Reference\n\n#### Tokenizer.Result\n\n```typescript\ninterface Result {\n  state: Tokenizer.State\n  tokens: Tokenizer.AnyToken[]\n}\n```\n\n-   `state`   \nThe current state of tokenizer. It can be persisted and passed to the next tokenizer call if the input is coming in chunks.\n-   `tokens`  \n  Array of resulting tokens.  \n  Type: [Tokenizer.AnyToken[]](#tokenizeranytoken)\n\n#### TreeConstructor.Result\n\n```typescript\ninterface Result {\n  state: State\n  ast: AST\n}\n```\n\n-   `state`  \nThe current state of the tree constructor. Can be persisted and passed to the next tree constructor call in case when tokens are coming in chunks.\n  \n-   `ast`  \n  Resulting AST.  \n  Type: [TreeConstructor.AST](#treeconstructorast)  \n\n#### Tokenizer.Token\n\nGeneric Token, other interfaces use it to create a specific Token type.\n\n```typescript\ninterface Token<T extends TokenTypes.AnyTokenType> {\n  type: T\n  content: string\n  startPosition: number\n  endPosition: number\n}\n```\n\n-   `type`  \nOne of the [Token types](#TokenizerTokenTypesAnyTokenType).\n  \n-   `content `   \nPiece of original HTML string which was recognized as a token.\n  \n-   `startPosition `   \nIndex of a character in the input HTML string where the token starts.\n  \n-   `endPosition`  \nIndex of a character in the input HTML string where the token ends.\n\n#### Tokenizer.TokenTypes.AnyTokenType\n\nShortcut type of all possible tokens.\n\n```typescript\ntype AnyTokenType =\n  | Text\n  | OpenTagStart\n  | AttributeKey\n  | AttributeAssigment\n  | AttributeValueWrapperStart\n  | AttributeValue\n  | AttributeValueWrapperEnd\n  | OpenTagEnd\n  | CloseTag\n  | OpenTagStartScript\n  | ScriptTagContent\n  | OpenTagEndScript\n  | CloseTagScript\n  | OpenTagStartStyle\n  | StyleTagContent\n  | OpenTagEndStyle\n  | CloseTagStyle\n  | DoctypeStart\n  | DoctypeEnd\n  | DoctypeAttributeWrapperStart\n  | DoctypeAttribute\n  | DoctypeAttributeWrapperEnd\n  | CommentStart\n  | CommentContent\n  | CommentEnd\n```\n\n#### Tokenizer.AnyToken\n\nShortcut to reference any possible token.\n\n```typescript\ntype AnyToken = Token<TokenTypes.AnyTokenType>\n```\n\n#### TreeConstructor.AST\n\nJust an alias to DocumentNode. AST always has one top-level DocumentNode. See [AST Node Types](#ast-node-types)\n\n```typescript\ntype AST = TreeConstructor.DocumentNode\n```\n\n### AST Node Types\n\nThere are 7 possible types of Node. Each type has a specific content.\n\n```typescript\ntype DocumentNode = Node<NodeTypes.Document, NodeContents.Document>\t\n```\n\n```typescript\ntype DoctypeNode = Node<NodeTypes.Doctype, NodeContents.Doctype>\n```\n\n```typescript\ntype TextNode = Node<NodeTypes.Text, NodeContents.Text>\n```\n\n```typescript\ntype TagNode = Node<NodeTypes.Tag, NodeContents.Tag>\n```\n\n```typescript\ntype CommentNode = Node<NodeTypes.Comment, NodeContents.Comment>\n```\n\n```typescript\ntype ScriptNode = Node<NodeTypes.Script, NodeContents.Script>\n```\n\n```typescript\ntype StyleNode = Node<NodeTypes.Style, NodeContents.Style>\n```\n\nInterfaces for each content type:\n\n- [Document](#TreeConstructorNodeContentsDocument)\n- [Doctype](#TreeConstructorNodeContentsDoctype)\n- [Text](#TreeConstructorNodeContentsText)\n- [Tag](#TreeConstructorNodeContentsTag)\n- [Comment](#TreeConstructorNodeContentsComment)\n- [Script](#TreeConstructorNodeContentsScript)\n- [Style](#TreeConstructorNodeContentsStyle)\n\n#### TreeConstructor.Node\n\nGeneric Node, other interfaces use it to create specific Nodes by providing type of Node and type of the content inside the Node.\n\n```typescript\ninterface Node<T extends NodeTypes.AnyNodeType, C extends NodeContents.AnyNodeContent> {\n  nodeType: T\n  content: C\n}\n```\n\n#### TreeConstructor.NodeTypes.AnyNodeType\n\nShortcut type of all possible Node types.\n\n```typescript\ntype AnyNodeType =\n  | Document\n  | Doctype\n  | Tag\n  | Text\n  | Comment\n  | Script\n  | Style\n```\n\n### Node Content Types\n\n#### TreeConstructor.NodeTypes.AnyNodeContent\n\nShortcut type of all possible types of content inside a Node.\n\n```typescript\ntype AnyNodeContent =\n  | Document\n  | Doctype\n  | Text\n  | Tag\n  | Comment\n  | Script\n  | Style\n```\n\n#### TreeConstructor.NodeContents.Document\n\n```typescript\ninterface Document {\n  children: AnyNode[]\n}\n```\n\n#### TreeConstructor.NodeContents.Doctype\n\n```typescript\ninterface Doctype {\n  start: Tokenizer.Token<Tokenizer.TokenTypes.DoctypeStart>\n  attributes?: DoctypeAttribute[]\n  end: Tokenizer.Token<Tokenizer.TokenTypes.DoctypeEnd>\n}\n```\n\n#### TreeConstructor.NodeContents.Text\n\n```typescript\ninterface Text {\n  value: Tokenizer.Token<Tokenizer.TokenTypes.Text>\n}\n```\n\n#### TreeConstructor.NodeContents.Tag\n\n```typescript\ninterface Tag {\n  name: string\n  selfClosing: boolean\n  openStart: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagStart>\n  attributes?: TagAttribute[]\n  openEnd: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagEnd>\n  children?: AnyNode[]\n  close: Tokenizer.Token<Tokenizer.TokenTypes.CloseTag>\n}\n```\n\n#### TreeConstructor.NodeContents.Comment\n\n```typescript\ninterface Comment {\n  start: Tokenizer.Token<Tokenizer.TokenTypes.CommentStart>\n  value: Tokenizer.Token<Tokenizer.TokenTypes.CommentContent>\n  end: Tokenizer.Token<Tokenizer.TokenTypes.CommentEnd>\n}\n```\n\n#### TreeConstructor.NodeContents.Script\n\n```typescript\ninterface Script {\n  openStart: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagStartScript>\n  attributes?: TagAttribute[]\n  openEnd: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagEndScript>\n  value: Tokenizer.Token<Tokenizer.TokenTypes.ScriptTagContent>\n  close: Tokenizer.Token<Tokenizer.TokenTypes.CloseTagScript>\n}\n```\n\n#### TreeConstructor.NodeContents.Style\n\n```typescript\ninterface Style {\n  openStart: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagStartStyle>,\n  attributes?: TagAttribute[],\n  openEnd: Tokenizer.Token<Tokenizer.TokenTypes.OpenTagEndStyle>,\n  value: Tokenizer.Token<Tokenizer.TokenTypes.StyleTagContent>,\n  close: Tokenizer.Token<Tokenizer.TokenTypes.CloseTagStyle>\n}\n```\n\n#### TreeConstructor.DoctypeAttribute\n\n```typescript\ninterface DoctypeAttribute {\n  startWrapper?: Tokenizer.Token<Tokenizer.TokenTypes.DoctypeAttributeWrapperStart>,\n  value: Tokenizer.Token<Tokenizer.TokenTypes.DoctypeAttribute>,\n  endWrapper?: Tokenizer.Token<Tokenizer.TokenTypes.DoctypeAttributeWrapperEnd>\n}\n```\n\n#### TreeConstructor.TagAttribute\n\n```typescript\ninterface TagAttribute {\n  key?: Tokenizer.Token<Tokenizer.TokenTypes.AttributeKey>,\n  startWrapper?: Tokenizer.Token<Tokenizer.TokenTypes.AttributeValueWrapperStart>,\n  value?: Tokenizer.Token<Tokenizer.TokenTypes.AttributeValue>,\n  endWrapper?: Tokenizer.Token<Tokenizer.TokenTypes.AttributeValueWrapperEnd>\n}\n```\n","_attachments":{},"homepage":"https://github.com/nik-garmash/hyntax","bugs":{"url":"https://github.com/nik-garmash/hyntax/issues"},"license":"MIT"}