{"_id":"2vdom","_rev":"11-0f1b635653d0a1a73c1ed4d5cfa7e690","name":"2vdom","description":"Framework-agnostic library for parsing HTML into vdom of your choice","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"2vdom","description:":"Parse HTML into vdom of your favorite vdom dialect","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"README":"README.md","license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.0.1","description":"Parse HTML into vdom of your favorite vdom dialect","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"8eab48d873675e9b5ab397186b688204210bee96","_id":"2vdom@0.0.1","_shasum":"ca31c9434974057c8a1aaad9f0432311fd51d058","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"ca31c9434974057c8a1aaad9f0432311fd51d058","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.0.1.tgz","integrity":"sha512-JjOyD6OqJXO4PJMnbaUSJq11vyw/HrxGz3Ft0xg84hnS3Oo1Tv4gd5Bd5Qsor+Z8S3QmKXUps95W9SahOnLmYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBy3GLmOrXRJqYlyS/yYgVnS1EHoQEGqdswUHxOXSpRFAiAjW1S/qDh7VBRBOqfjp1lg12HT2eNd2prt853BGgTEXw=="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}]},"0.0.1-2":{"name":"2vdom","description:":"Parse HTML into vdom of your favorite vdom dialect","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"README":"README.md","license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.0.1-2","description":"Parse HTML into vdom of your favorite vdom dialect","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"70c703b31e96aae0d60afe54d9f51187aac709b1","_id":"2vdom@0.0.1-2","_shasum":"cd606d53a60ee140b0e5723ef8ad3dc4ea0c6991","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"cd606d53a60ee140b0e5723ef8ad3dc4ea0c6991","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.0.1-2.tgz","integrity":"sha512-jBRZvDVXSec4kUryLuys7sLHTNuW19SCFnGHxEDzY8mK566s/DCVFEqhFV8d/tDWcxqvCnOPG/ogwuBKEqe7ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGjccvoFxvs3luLn6QnQXHda0hf9SoJSm4KGu3BsyZdAIgao9vGgrvv1I5uO30MgildCIBi1NIPC2OVMXHSacp3Jc="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}]},"0.0.1-3":{"name":"2vdom","description:":"Framework-agnostic library for parsing HTML into the vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.0.1-3","description":"Parse HTML into vdom of your favorite vdom dialect","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"6e1457a0e9381e075100df997684cefc06b6468d","_id":"2vdom@0.0.1-3","_shasum":"a48b7de0d3ebd4bf9a37a3773246b88c669fb2a9","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"a48b7de0d3ebd4bf9a37a3773246b88c669fb2a9","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.0.1-3.tgz","integrity":"sha512-+8/z8G2mGftVVTKOpq95Ts+wdn4Q+Y0n9F3vfZ9vb7w32JXZCwg4iIpDYcn4aSmwB1ngivuhM3sOKaA1qsOY3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2C6nYZP9MIt4+8bA4eVBWVs0KZMqif2t1RtdKbPyaRgIgVYTdIJqRg4BA2A4rbz7VZT8BdnJOTHTW0AHDrlZqeR0="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}]},"0.0.1-4":{"name":"2vdom","description:":"Framework-agnostic library for parsing HTML into the vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.0.1-4","description":"Parse HTML into vdom of your favorite vdom dialect","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"ebacbf17f6e93dd5726a4f851da28303a6c27554","_id":"2vdom@0.0.1-4","_shasum":"9c01c4892081d070b921a26395d3bd4f2c32f43a","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"9c01c4892081d070b921a26395d3bd4f2c32f43a","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.0.1-4.tgz","integrity":"sha512-taABiJ9DdhYjGLeAkIOIZnJSOgRIIwoovqoms182fdHrXLwlYgKdDttTMrJa8Nng4Mo+qanIgDLiFmb5mkNGaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3nLXwMq1bXRo2gSbHw9x50sbaQLHsUgkIbgBzZAa4FwIgcXFtZ4zjjeXzVYAHAdEWkLlPy9oX9PDFbHJx0pRTcR8="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}]},"0.1.0":{"name":"2vdom","description:":"Framework-agnostic library for parsing HTML into the vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16"},"dependencies":{"htmlparser2":"~3.9.0"},"version":"0.1.0","description":"Parse HTML into vdom of your favorite vdom dialect","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"cefe80e42a1fc74d68032d41618bd6b6b0b4528f","_id":"2vdom@0.1.0","_shasum":"cc655d32b86a732a03ad7e15cd888f3fecc6593a","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"cc655d32b86a732a03ad7e15cd888f3fecc6593a","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.1.0.tgz","integrity":"sha512-qSlF4ruIL3cfeV0W+SLEQg+KcMfx16ylG45z2DQmtyKEl7VVkLQKqUYt0K+H8x1Fcz0EJYHsgrsTDoMDRWm4aA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChoLyLtBus3LoJiVAujyy7DGdwBVyHUVB5M1gY2u8OXgIhAOKhEvHLpqhCdcpQWb33yL7mt8SeGZPI1vLJb+1cbHcm"}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/2vdom-0.1.0.tgz_1454724889701_0.29240508982911706"}},"0.1.1":{"name":"2vdom","description:":"Framework-agnostic library for parsing HTML into vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16","virtual-dom":"^2.1.1"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.1.1","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"afc7d281596da37a46bbaac9b38730479cf3ecb9","description":"2vdom =====","_id":"2vdom@0.1.1","_shasum":"94ce871afc09ca864d885271f8073a6b1711adc8","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"94ce871afc09ca864d885271f8073a6b1711adc8","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.1.1.tgz","integrity":"sha512-EijqP4RsqWigp5GGj+20kR1o5s8eQWvjTjr0SVBfzEklhQDBAM9ODF6Vk078+aJCEnKLHk011ebMfGUARryctA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU1QlWYq07hgCrUQCJW6n6+FEffq2uWeQ+2/l7xoT5fgIhAKT3QAfpAc3i6Fq3Dku+UILYixkfuWbTXgYn6FRBt88f"}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/2vdom-0.1.1.tgz_1454726858567_0.9989006344694644"}},"0.1.2":{"name":"2vdom","description":"Framework-agnostic library for parsing HTML into vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16","virtual-dom":"^2.1.1"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.1.2","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"fb15b7856fea9a68f82e57c5abff1ac9d4edd597","_id":"2vdom@0.1.2","_shasum":"0484f83a9295770059b21e80edeae5e2047def3b","_from":".","_npmVersion":"3.3.5","_nodeVersion":"5.5.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"0484f83a9295770059b21e80edeae5e2047def3b","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.1.2.tgz","integrity":"sha512-aopGA5Ef6Q1+TV2fvLfQeGfnmWL8Gtb3ucmLT1PT05yDmrvyC38yoEaKlhAAYnLHtQuPJ2pN/EWehsw+uDMVmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4/l/+4C/Pti54wQHxDfH1VHqsWyOaVDwZSZPO/fO5ewIgcbH81D2Pcl9Owy4blWbT5A70BKIpvGvZweCxRXry/HI="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/2vdom-0.1.2.tgz_1454727636770_0.9099477755371481"}},"0.2.0":{"name":"2vdom","description":"Framework-agnostic library for parsing HTML into vdom of your choice","repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"license":"BSD-2-Clause","main":"index.js","devDependencies":{"babel-core":"^6.4.5","babel-plugin-transform-react-jsx":"^6.4.0","deku":"^2.0.0-rc16","virtual-dom":"^2.1.1"},"dependencies":{"htmlparser2":"^3.9.0"},"version":"0.2.0","scripts":{"test":"jasmine"},"keywords":["vdom","jsx","html","htmlparser"],"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"homepage":"https://github.com/xkxx/2vdom#readme","gitHead":"2fa0a2d6715cfb577f6f2617c15950171a6be6a4","_id":"2vdom@0.2.0","_shasum":"a5da5eb87d45d3783ff119686c8070defdcfb0fd","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"xkxx","email":"xkxiang@gmail.com"},"dist":{"shasum":"a5da5eb87d45d3783ff119686c8070defdcfb0fd","tarball":"https://registry.npmjs.org/2vdom/-/2vdom-0.2.0.tgz","integrity":"sha512-f2MNlIELXE64Lkp5PQL4j3Hr0dwIic5ecVm/D1S2RUU+s9peCorXr44JEsfpfLsyFdjPLuNClslCCxI3gEv5Kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGIZTZz13yIlB8B8vPOsO40orjvocoKbwtxwc+db40EiAiBqcY3jb8mzexkQrQu/EAqVhdxY1jIR5aboqAYPSO6oZg=="}]},"maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/2vdom-0.2.0.tgz_1458518712290_0.8554528977256268"}}},"readme":"2vdom\n=====\n\n[![npm version](https://badge.fury.io/js/2vdom.svg)](https://badge.fury.io/js/2vdom)\n\nA node library for parsing HTML into vdom of your choice.\n\nDifferences from [html-virtualize](https://github.com/alexmingoia/html-virtualize):\n\n* 2vdom doesn't restrict you to [virtual-dom](https://github.com/Matt-Esch/virtual-dom).\n  Pass in the jsx-compatible pragma function from your framework (or write one),\n  and it just generates the right vdom for you.\n* html-virtualize depends on [vtree](https://github.com/Matt-Esch/vtree), which\n  is an obsolete implementation of virtual-dom. 2vdom doesn't depend on any\n  specific vdom implementation, so it doesn't get obsolete as long as jsx doesn't.\n* As a result, 2vdom has much fewer dependencies. It only depends on\n  [htmlparser2](https://github.com/fb55/htmlparser2).\n\nUsage\n-----\n\n### Installation\n\n```bash\n> npm install 2vdom\n```\n\n### Top-level API\n\n#### parse(pragma, html | buffer)\n\n* `pragma`: jsx-compatible pragma function, e.g. React.createElement\n* `html`: html to parse. May be an ordinary js string or Node.js Buffer\n* *Returns*: parsed tree produced by your pragma function\n\n#### parse.stream(pragma, stream)\n\n* stream: Node.js ReadStream containing the html to be parsed\n* *Returns*: a `Promise` that resolves to the parsed tree.\n\n### Usage with React / Deku / ...\n\n```js\nlet parse = require('2vdom');\n\nlet html = \"<html>...</html>\";\nlet pragma = React.createElement || deku.element || <some jsx pragma fn>;\n\nlet vdom = parse(pragma, html);\n// Buffer works too:\nparse(pragma, fs.readFileSync('<filename>'))\n```\n\n### Usage with virtual-dom (hyperscript)\n\n```js\nlet pragma = (tagname, attrs, ...children) =>\n  h(tagname, attrs, children);\n\n// carry on as usual ...\nlet vdom = parse(pragma, html);\n```\n\n### Usage with node.js streams\n\n```js\nlet fileStream = fs.createReadStream('<filename>');\n\nparse.stream(pragma, fileStream)\n.then(function(vdom) {\n  // your code here ...\n});\n```\n\n### Limitations\n\nThere's a number of limitations of 2vdom that should not affect normal usage.\nHowever, if you encounter them in any actual use case or if you have good ideas\nfor overcoming them, please issue or PR.\n\n* 2vdom doesn't currently preserve comments. So if you rely on IE conditional\n  comments, you are in a bit of a trouble here. This is an inherent limitation\n  of JSX, because there's no way of conveying comments to vdom pragma functions.\n* 2vdom doesn't currently preserve HTML directives e.g. `<!doctype>` Again,\n  because there's no way of conveying these to pragma functions.\n* 2vdom expects a single element (i.e. `<html>`) at document root. If you have\n  multiple ones, 2vdom throws away every one but the last element. This is not\n  a technical limitation, so let me know if you need this feature.\n\nTesting\n-------\n\n```bash\n> jasmine\n```\n\nLicense\n-------\n\n2-Clause BSD\n","maintainers":[{"name":"xkxx","email":"xkxiang@gmail.com"}],"time":{"modified":"2022-06-12T14:07:05.155Z","created":"2016-01-30T06:48:00.224Z","0.0.1":"2016-01-30T06:48:00.224Z","0.0.1-2":"2016-01-30T07:05:01.433Z","0.0.1-3":"2016-01-30T07:15:01.625Z","0.0.1-4":"2016-01-30T07:16:15.154Z","0.1.0":"2016-02-06T02:14:51.850Z","0.1.1":"2016-02-06T02:47:40.973Z","0.1.2":"2016-02-06T03:00:37.612Z","0.2.0":"2016-03-21T00:05:12.740Z"},"homepage":"https://github.com/xkxx/2vdom#readme","keywords":["vdom","jsx","html","htmlparser"],"repository":{"type":"git","url":"git+https://github.com/xkxx/2vdom.git"},"author":{"name":"xkxx"},"bugs":{"url":"https://github.com/xkxx/2vdom/issues"},"license":"BSD-2-Clause","readmeFilename":"README.md","users":{"xkxx":true}}