{"name":"html-format","version":"1.1.1","description":"Format HTML strings.","main":"index.js","devDependencies":{"typescript":"^5.0.4"},"scripts":{"build":"tsc -p jsconfig.json","test":"node --test","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":"1639c035ab8bd8fe9701aaddf3dd1a2a1ecd0430","_id":"html-format@1.1.1","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-RiYNtRGdYikB583ADnlfNVK0/nRTTOsvUQSZ35lfks1Dvqy9nE+bminev83IgFo18gUzLgJk4gDGVKKVrOS3Bg==","shasum":"24e4f57d5c08d7a088ee756144d0adf694568d76","tarball":"http://registry-npm.ywwl.com/html-format/download/html-format-1.1.1.tgz","fileCount":5,"unpackedSize":9106,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDh7Lm435mzR2ESXovO6wAGci0fciZ8CJYCipBs2XbOogIhAO5YxsLrVFGN4mrV+iAQvHdJBe6M5Z9bRnsoVQkhSwNm"}],"size":3417,"noattachment":false,"key":"/html-format/-/html-format-1.1.1.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.1.1_1684447740415_0.8049998103309444"},"_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":1684447740571,"_cnpm_publish_time":1684447740571,"dist-tags":{"latest":"1.1.7"}}