{"name":"html-format","version":"1.1.5","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.5","gitHead":"f042b5d3a59ac94a7fb3c191141c5de73120e299","types":"./index.d.ts","_nodeVersion":"20.10.0","_npmVersion":"10.2.5","dist":{"integrity":"sha512-vrl6DEvpzHBNrMAikMekmvXZNqOQT1nUUQoH57mOan8wXSV1Qw7mGmpHrSmO+kKUun6mAV5iflWBYp+z5RE3zQ==","shasum":"ad529e1578d4f80af80e4392b3e0bb0506b941d0","tarball":"http://registry-npm.ywwl.com/html-format/download/html-format-1.1.5.tgz","fileCount":5,"unpackedSize":9295,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhhVO5dvCRzutRSdmChCVddDthaTSogiXKlq5sr3aEpQIhAM5uUydA6TbJtwfD6kkdFLeI4DCj+/frJtvkHuGmAjFP"}],"size":3560,"noattachment":false,"key":"/html-format/-/html-format-1.1.5.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.5_1703068347557_0.1916281704518894"},"_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":1703068347729,"_cnpm_publish_time":1703068347729,"dist-tags":{"latest":"1.1.7"}}