# @starptech/rehype-minify-whitespace

> Collapse whitespace.

Latest version **0.10.0** (published 2019-06-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @starptech/rehype-minify-whitespace
pnpm add @starptech/rehype-minify-whitespace
yarn add @starptech/rehype-minify-whitespace
bun add @starptech/rehype-minify-whitespace
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2019-06-21 |
| First published | 2018-10-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dustin Deus |
| Maintainers | starptech |
| Keywords | prettyhtml, collapse, whitespace |

## Links

- npm: https://www.npmjs.com/package/@starptech/rehype-minify-whitespace
- npm.io page: https://npm.io/package/@starptech/rehype-minify-whitespace

## Dependencies (8)

- [unist-util-is](https://npm.io/package/unist-util-is.md) ^2.1.3
- [hast-util-embedded](https://npm.io/package/hast-util-embedded.md) ^1.0.4
- [collapse-white-space](https://npm.io/package/collapse-white-space.md) ^1.0.5
- [hast-util-is-element](https://npm.io/package/hast-util-is-element.md) ^1.0.3
- [hast-util-has-property](https://npm.io/package/hast-util-has-property.md) ^1.0.3
- [hast-util-is-body-ok-link](https://npm.io/package/hast-util-is-body-ok-link.md) ^1.0.2
- [unist-util-modify-children](https://npm.io/package/unist-util-modify-children.md) ^1.1.4
- [html-whitespace-sensitive-tag-names](https://npm.io/package/html-whitespace-sensitive-tag-names.md) ^1.0.1

## Recent versions

- 0.10.0 (latest) — 2019-06-21
- 0.9.0 — 2019-04-28
- 0.8.17 — 2019-04-07
- 0.8.14 — 2018-12-14
- 0.8.13 — 2018-12-13
- 0.8.12 — 2018-12-12
- 0.8.10 — 2018-12-09
- 0.8.7 — 2018-12-06
- 0.8.1 — 2018-11-12
- 0.8.0 — 2018-11-11
- 0.7.0 — 2018-11-10
- 0.6.0 — 2018-11-08
- 0.5.3 — 2018-11-08
- 0.5.2 — 2018-11-06
- 0.5.0 — 2018-10-28
- … 11 more at https://npm.io/package/@starptech/rehype-minify-whitespace/versions

## README

# @starptech/rehype-minify-whitespace

Collapse whitespace.

Normally, collapses to a single space. If `newlines: true`,
collapses white-space containing newlines to `'\n'` instead
of `' '`.

## Installation

```
npm install --save @starptech/rehype-minify-whitespace
```

## Usage

##### In

```html
<h1>Heading</h1>
···→ →···foo···→
<p><strong>This</strong> and <em>that</em></p>
```

##### Out

```html
<h1>Heading</h1>
foo
<p><strong>This</strong> and <em>that</em></p>
```

## Api

###### `node.data.ignore`

When this property is `true` the node is skipped for whitespace handling.

###### `node.data.preserveWhitespace`

When this property is `true` the node is skipped for whitespace handling.

## Caveats

The implementation is a modified version of [**Rehype rehype-minify-whitespace 2.0.3**](https://github.com/rehypejs/rehype-minify/tree/master/packages/rehype-minify-whitespace)

---
_Source: https://npm.io/package/@starptech/rehype-minify-whitespace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
