# strip-html-comments

> Remove HTML comments from a string.

Latest version **1.0.0** (published 2015-11-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install strip-html-comments
pnpm add strip-html-comments
yarn add strip-html-comments
bun add strip-html-comments
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-11-02 |
| First published | 2015-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | html, strip, comment, comments |

## Links

- npm: https://www.npmjs.com/package/strip-html-comments
- Repository: https://github.com/johnotander/strip-html-comments
- Homepage: https://github.com/johnotander/strip-html-comments#readme
- Issues: https://github.com/johnotander/strip-html-comments/issues
- npm.io page: https://npm.io/package/strip-html-comments

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-11-02
- 0.0.2 — 2015-07-16
- 0.0.1 — 2015-07-16

## README

# strip-html-comments [![Build Status](https://secure.travis-ci.org/johnotander/strip-html-comments.png?branch=master)](https://travis-ci.org/johnotander/strip-html-comments) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Remove HTML comments from a string. This is intended to be a simple utility for the most trivial of comment stripping.

## Installation

```bash
npm install --save strip-html-comments
```

## Usage

```javascript
var stripHtmlComments = require('strip-html-comments')

stripHtmlComments('<span>foo<!--bar--></span>')  // => '<span>foo</span>
```

## Known Limitations

It will remove comments in `<textarea>`s:

```html
<textarea><!-- comment in a textarea --></textarea>
```

## License

MIT

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

---
_Source: https://npm.io/package/strip-html-comments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
