{"name":"normalize-html-whitespace","description":"Safely remove repeating whitespace from HTML text.","version":"0.2.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":"0740f5e8336bce17a10f3a301e202d1e919b9f3d","_id":"normalize-html-whitespace@0.2.0","_shasum":"101722f6423551c75cdb8f9d104ff850daf1e10e","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.2.0","_npmUser":{"name":"stevenvachon","email":"contact@svachon.com"},"dist":{"shasum":"101722f6423551c75cdb8f9d104ff850daf1e10e","tarball":"http://registry-npm.ywwl.com/normalize-html-whitespace/download/normalize-html-whitespace-0.2.0.tgz","integrity":"sha512-5CZAEQ4bQi8Msqw0GAT6rrkrjNN4ZKqAG3+jJMwms4O6XoMvh6ekwOueG4mRS1LbPUR1r9EdnhxxfpzMTOdzKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFEMC7O+S/so5dSW5eKwqh3Kp0ocJ9aGZt2u5RELz431AiA1ACxbn6MXc2TwyKGN+8+oV1TY1fUIs8PrfwB15UfnPg=="}],"size":2290,"noattachment":false,"key":"/normalize-html-whitespace/-/normalize-html-whitespace-0.2.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":1450214603798,"_cnpm_publish_time":1450214603798,"dist-tags":{"latest":"1.0.0"}}