{"name":"normalize-html-whitespace","description":"Safely remove repeating whitespace from HTML.","version":"0.1.0","license":"MIT","homepage":"https://github.com/stevenvachon/normalize-html-whitespace","author":{"name":"Steven Vachon","email":"contact@svachon.com","url":"http://www.svachon.com/"},"repository":{"type":"git","url":"git://github.com/stevenvachon/normalize-html-whitespace.git"},"bugs":{"url":"https://github.com/stevenvachon/normalize-html-whitespace/issues"},"devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4"},"engines":{"node":">= 0.10"},"scripts":{"test":"mocha test --reporter spec --check-leaks --bail"},"files":["index.js","license"],"keywords":["collapse","condense","compact","html","minify","normalize","remove","space","str","string","strip","trim","whitespace"],"gitHead":"9b7b4fd6975e4c3a49170aff1d5f2cb538689ca7","_id":"normalize-html-whitespace@0.1.0","_shasum":"d41b50e6dd0c3503063720862a40296e22ad3762","_from":"git://github.com/stevenvachon/normalize-html-whitespace.git","_resolved":"git://github.com/stevenvachon/normalize-html-whitespace.git#9b7b4fd6975e4c3a49170aff1d5f2cb538689ca7","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"d41b50e6dd0c3503063720862a40296e22ad3762","tarball":"http://registry-npm.ywwl.com/normalize-html-whitespace/download/normalize-html-whitespace-0.1.0.tgz","integrity":"sha512-Fy15G2P13sllT5pjhIW9Khu8+c+Rm9HE1BlINsFVKlK8lh00fI38JFFOhsQ+U7NVmL8Yh1btbdkI8ehJTAT87A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFYRtjou60oTNIt90r2mGvq7hYuipRVazXFXkq0/43FwIgZ0/Sw89ixGesIZla2ZpkL5NpueefLwqyhEr1ij6y6+E="}],"size":2204,"noattachment":false,"key":"/normalize-html-whitespace/-/normalize-html-whitespace-0.1.0.tgz"},"maintainers":[{"name":"stevenvachon","email":"contact@svachon.com"}],"directories":{},"readme":"# normalize-html-whitespace [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]\n\n> Safely remove repeating whitespace from HTML text.\n\n\nUsing `\\s` to normalize HTML whitespace will strip out characters that are actually rendered by a web browser. Such would be classified as a lossy change and would produce a different visual result. This package will collapse multiple whitespace characters down to a single space, while ignoring the following characters:\n\n* `\\u00a0` or `&nbsp;` (non-breaking space)\n* `\\ufeff` or `&#65279;` (zero-width non-breaking space)\n\n…as well as these lesser-known ones:\n\n* `\\u1680`​ or `&#5760;` (Ogham space mark)\n* `\\u180e` or `&#6158;` (Mongolian vowel separator)\n* `\\u2000​` or `&#8192;` (en quad)\n* `\\u2001` or `&#8193;` (em quad)\n* `\\u2002` or `&#8194;` (en space)\n* `\\u2003` or `&#8195;` (em space)\n* `\\u2004` or `&#8196;` (three-per-em space)\n* `\\u2005` or `&#8197;` (four-per-em space)\n* `\\u2006` or `&#8198;` (six-per-em space)\n* `\\u2007` or `&#8199;` (figure space)\n* `\\u2008` or `&#8200;` (punctuation space)\n* `\\u2009` or `&#8201;` (thin space)\n* `\\u200a` or `&#8202;` (hair space)\n* `\\u2028` or `&#8232;` (line separator)\n* `\\u2029` or `&#8233;` (paragraph separator)\n* `\\u202f` or `&#8239;` (narrow non-breaking space)\n* `\\u205f` or `&#8287;` (medium mathematical space)\n* `\\u3000` or `&#12288;` (ideographic space)\n\nFor the sake of completeness, the following characters which are not part of `\\s` will also not be affected:\n\n* `\\u200b` or `&#8203;` (zero-width breaking space)\n\nNote: this package does not contain an HTML parser. It is meant to be used on text nodes only.\n\n\n## Installation\n[Node.js](http://nodejs.org/) `>= 8` is required. Type this at the command line:\n```shell\nnpm install normalize-html-whitespace\n```\n\n\n## Usage\n```js\nconst normalizeWhitespace = require('normalize-html-whitespace');\n\nnormalizeWhitespace('  foo bar     baz ');\n//-> ' foo bar baz '\n```\n\n\n[npm-image]: https://img.shields.io/npm/v/normalize-html-whitespace.svg\n[npm-url]: https://npmjs.com/package/normalize-html-whitespace\n[travis-image]: https://img.shields.io/travis/stevenvachon/normalize-html-whitespace.svg\n[travis-url]: https://travis-ci.org/stevenvachon/normalize-html-whitespace\n","publish_time":1449886900328,"_cnpm_publish_time":1449886900328,"dist-tags":{"latest":"1.0.0"}}