{"name":"html-format","version":"1.1.3","description":"Format HTML strings.","main":"index.js","devDependencies":{"typescript":"^5.3.3"},"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","_id":"html-format@1.1.3","gitHead":"45a538c48b523e5f08e902e003d66154d32e055b","types":"./index.d.ts","_nodeVersion":"20.10.0","_npmVersion":"10.2.5","dist":{"integrity":"sha512-NSgI8w0AHdWxwNH/0mpCySGO4PM+lIm45QHynCdzZYrbl2B6M4JB2tnnKEW0xGeUSb7wuWZXJrVtg9100shDNg==","shasum":"031f0c675ec4c8b4354e92859c42cb638315a8a7","tarball":"http://registry-npm.ywwl.com/html-format/download/html-format-1.1.3.tgz","fileCount":5,"unpackedSize":9287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjZNrJwLqBsbFnxcqI0kArIHl8StRueMIeY231vzYsWAIgOYme2pHS/oVpIWDnCu2nhPhF5phSIjBNOC1z5Nd0K7Q="}],"size":3558,"noattachment":false,"key":"/html-format/-/html-format-1.1.3.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.3_1703063553837_0.5425279279041544"},"_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":1703063554079,"_cnpm_publish_time":1703063554079,"dist-tags":{"latest":"1.1.7"}}