# strip-bom-stream

> Strip UTF-8 byte order mark (BOM) from a stream

Latest version **5.0.0** (published 2021-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install strip-bom-stream
pnpm add strip-bom-stream
yarn add strip-bom-stream
bun add strip-bom-stream
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2021-08-15 |
| First published | 2015-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | bom, strip, byte, mark, unicode, utf8, utf-8, remove, delete, trim, text, stream, streams |

## Links

- npm: https://www.npmjs.com/package/strip-bom-stream
- Repository: https://github.com/sindresorhus/strip-bom-stream
- Homepage: https://github.com/sindresorhus/strip-bom-stream#readme
- Issues: https://github.com/sindresorhus/strip-bom-stream/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/strip-bom-stream

## Dependencies (2)

- [strip-bom-buf](https://npm.io/package/strip-bom-buf.md) ^3.0.0
- [first-chunk-stream](https://npm.io/package/first-chunk-stream.md) ^5.0.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2021-08-15
- 4.0.0 — 2019-05-12
- 3.0.0 — 2017-01-25
- 2.0.0 — 2015-11-23
- 1.0.0 — 2015-06-29

## README

# strip-bom-stream

> Strip UTF-8 [byte order mark](https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a stream

From Wikipedia:

> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.

## Install

```
$ npm install strip-bom-stream
```

## Usage

```js
import fs from 'node:fs';
import stripBomStream from 'strip-bom-stream';

fs.createReadStream('unicorn.txt')
	.pipe(stripBomStream())
	.pipe(fs.createWriteStream('unicorn.txt'));
```

It's a [`Transform` stream](https://nodejs.org/api/stream.html#stream_class_stream_transform).

## Related

- [strip-bom](https://github.com/sindresorhus/strip-bom) - String version of this module
- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module

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