{"name":"html-format","version":"1.1.2","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":"3db77fe56ddc0f056a8d93d2e61a7bc4f4d045d9","_id":"html-format@1.1.2","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-5Y9SJxl5cKn2Oc2L7RV6M14xYUNIdxjcTzVGrqBeBDwL+yGpdAGrSSz9kakJqMvZn/yq8fDAuo9Z0CyQ/aThPw==","shasum":"70ad8bf38037251300b9ffdb44dffc37f980e218","tarball":"http://registry-npm.ywwl.com/html-format/download/html-format-1.1.2.tgz","fileCount":5,"unpackedSize":9161,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKeBsd8C24oHSkZgyhmAhXsoPSpRU1n0d0SvA60QF9hAIgFVTInO8IZqMxxT78oljy9dAb1LOr0y+U9UTZ5+yI6kA="}],"size":3493,"noattachment":false,"key":"/html-format/-/html-format-1.1.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.1.2_1684590345490_0.9872837207004788"},"_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":1684590345646,"_cnpm_publish_time":1684590345646,"dist-tags":{"latest":"1.1.7"}}