{"name":"html2bemjson","version":"1.10.0","description":"HTML to BEMJSON convertor","main":"index.js","scripts":{"lint":"eslint .","unit":"node test/test.js","test":"npm run unit && npm run lint","cover":"istanbul cover test/test.js","coveralls":"npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/bem-incubator/html2bemjson.git"},"keywords":["bem","bemjson","html","html2bemjson","convertor"],"author":{"name":"Vladimir Grinenko"},"license":"MIT","bugs":{"url":"https://github.com/bem-incubator/html2bemjsonissues"},"dependencies":{"bem-naming":"^0.5.1","htmlparser2":"3.7.3","stringify-object":"^2.3.0"},"devDependencies":{"coveralls":"^2.13.1","eslint":"^3.19.0","eslint-config-pedant":"^0.9.0","glob":"^5.0.14","istanbul":"^0.4.5"},"gitHead":"38531d4b380a3bbfaae1d8a1dcdf40d49cf8b19f","homepage":"https://github.com/bem-incubator/html2bemjson#readme","_id":"html2bemjson@1.10.0","_shasum":"c2f5550a6ed0b34d1d95ab5831aa8d8e4db21448","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"tadatuta","email":"i@tadatuta.com"},"dist":{"shasum":"c2f5550a6ed0b34d1d95ab5831aa8d8e4db21448","tarball":"http://registry-npm.ywwl.com/html2bemjson/download/html2bemjson-1.10.0.tgz","integrity":"sha512-+CAxvNRmvb0HpkIdCZyj4bIAjfXVth67tjGRcvk+rZdmLkV8L6gYCTgqHAM7s+TBhywVxk/vWiFm+KxI5jgqhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXcN/G6lPgddGDoezTe1TVuxq4NVK8hhIlJUVe4O8g/AiEAi/RAVj1CZe9lm14dEeavqrCRJ+L2SgU/SvuL95Jh6ZY="}],"size":8568,"noattachment":false,"key":"/html2bemjson/-/html2bemjson-1.10.0.tgz"},"maintainers":[{"name":"tadatuta","email":"i@tadatuta.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/html2bemjson-1.10.0.tgz_1494539311174_0.476098416140303"},"directories":{},"readme":"# html2bemjson\n\nConverts HTML to [BEMJSON](https://en.bem.info/technology/bemjson/).\n\n## Installation\n```sh\nnpm install html2bemjson --save\n```\n\n## Usage\n```js\nvar html2bemjson = require('html2bemjson');\nvar html = '<div class=\"b1\"><div class=\"b1__elem1\"></div></div>';\n\nhtml2bemjson.convert(html); // BEMJSON object\n\nhtml2bemjson.stringify(html);\n// {\n//     block: 'b1',\n//     content: [\n//         {\n//             block: 'b1',\n//             elem: 'elem1'\n//         }\n//     ]\n// }\n```\n\n### Options\nBoth methods can take options object as a second argument:\n```js\nrequire('html2bemjson').stringify('<div class=\"b1 b1--mod\">', {\n    preserveComments: false,\n    naming: { elem: '__', mod: '--' }, // refer to https://en.bem.info/tools/bem/bem-naming/ for details\n    indent: '\\t'\n});\n```\n\nFor more examples please refer to `test` folder.\n","publish_time":1494539312140,"_cnpm_publish_time":1494539312140,"dist-tags":{"latest":"1.10.0"}}