{"name":"html-format","version":"1.0.2","description":"Format HTML strings.","main":"index.js","dependencies":{},"devDependencies":{"@types/node":"^18.6.2","@typescript-eslint/eslint-plugin":"^5.31.0","@typescript-eslint/parser":"^5.31.0","eslint":"^8.20.0","ts-node":"^10.9.1","typescript":"^4.7.4"},"scripts":{"build":"tsc","test":"ts-node test.ts","prepare":"npm run build","version":"npm test","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/mohd-akram/html-format.git"},"keywords":["html","format"],"author":{"name":"Mohamed Akram"},"license":"MIT","bugs":{"url":"https://github.com/mohd-akram/html-format/issues"},"homepage":"https://github.com/mohd-akram/html-format#readme","types":"./index.d.ts","gitHead":"676d8cbc293b325b5a0d7cdeaa4555f6e4b45486","_id":"html-format@1.0.2","_nodeVersion":"18.7.0","_npmVersion":"8.15.1","dist":{"integrity":"sha512-J8OFF3Q9jPcrxKxziJR0aLy5tCr4GDIrI3XblOXdMz9dFQ6DOad06wdFsBItH1Y9tLy9Im+W4Wcoe6H5QffpbA==","shasum":"a9723472fd3daf360457358ed635568360d030be","tarball":"http://registry-npm.ywwl.com/html-format/download/html-format-1.0.2.tgz","fileCount":5,"unpackedSize":9165,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzal44S8qvTfvLBheokfT3aRd1iP4lxTvpr0pc6S5E6AiAnKVC7AZ3OvCvZ/dThnt/u7MX4iMwryFB10PxpJQshyw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi45qnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFgA//fTrUXmseAF6XTUpDQw4CEyBPq3Q097/raGeH2YZVK0/f7/tl\r\nwgtWcEb+p/rHoQ31N7sJ8DeFuBpz41NWaky9YKUiMLEBQkJbYXqEQG+p9Tij\r\ndYygrknANL9zfzBxo6i6OtcFnv/xXWwuKVtIcSxKQX6prjX9sHYq7w6fv25l\r\nlKKtuWmB8BRdjcLj7oUkOBh1BDYTzidm85Rw+zDHMnxt3ykHRcDnwv9Eph/M\r\nuAjRBR4/Oo1PTVsptkrdgggv/+iuNmHcQqj9s6oq1azNMIbU+y48LBcNVVFa\r\n+lZ/gLnFW7pKbTMQBE/FRdIoyQNIh3RD1L/J4pcCXOjqGVYkwcVTIGwZz6PQ\r\nIwESEIZc/J5ofHOWPgFx2hqNTQSCEFQM4p5fvVNDtS9HsKyxG7A74G+dOXG0\r\nNGFAg5f5ht73+seAKvA+VZXO4y4O757eXJHvm88KIYyYGnNmYyi/f1NIkIKc\r\nP/u8zr2/nLi2dMNLW7cvtouwGe/yTnK9erQXAdfMH7ctuBNidFZoWVlQsEGX\r\nI9dFMBRikU2HJCiRSIzhz2BUgoqkQFHi/oN0shPo1dzyhH/9J2YhOF1tK4uf\r\nI/H78DUq6DX0pbqjHZbEM69fFoXYIIeiAD9wBYZXAkgiDKOohnfQI0yiVkyQ\r\nM4PKxfEJmQp4imstKDCJK0qyfoPfWqEPzoI=\r\n=x0W1\r\n-----END PGP SIGNATURE-----\r\n","size":3419,"noattachment":false,"key":"/html-format/-/html-format-1.0.2.tgz"},"_npmUser":{"name":"mohd-akram","email":"mohd.akram@outlook.com"},"directories":{},"maintainers":[{"name":"mohd-akram","email":"mohd.akram@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-format_1.0.2_1659083431036_0.5114172455826487"},"_hasShrinkwrap":false,"readme":"# html-format\n\nFormat HTML strings by indenting, wrapping, and removing unnecessary\nwhitespace while preserving newlines.\n\n## Install\n\n    npm install html-format\n\n## Usage\n\n```javascript\nimport format from \"html-format\";\n\nconst html = `\\\n<body>\n<main class=\"grid\">   </main>\n</body>\n`;\n\n// indent = 2 spaces (default), width = 80 characters (default)\nformat(html) ==\n  `\\\n<body>\n  <main class=\"grid\"> </main>\n</body>\n`;\n\n// indent = 4 spaces, width = 80 characters (default)\nformat(html, \" \".repeat(4)) ==\n  `\\\n<body>\n    <main class=\"grid\"> </main>\n</body>\n`;\n\n// indent = 4 spaces, width = 20 characters\nformat(html, \" \".repeat(4), 20) ==\n  `\\\n<body>\n    <main\n        class=\"grid\">\n    </main>\n</body>\n`;\n```\n","publish_time":1659083431224,"_cnpm_publish_time":1659083431224,"dist-tags":{"latest":"1.1.7"}}