# remove-bom-stream

> Remove a UTF8 BOM at the start of the stream.

Latest version **2.0.0** (published 2022-04-19) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.0 |
| Published | 2022-04-19 |
| First published | 2017-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10.13.0 |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gulp Team |
| Maintainers | yocontra, phated |
| Keywords | bom, remove, utf8, streaming, stream |

## Links

- npm: https://www.npmjs.com/package/remove-bom-stream
- Repository: https://github.com/gulpjs/remove-bom-stream
- Homepage: https://github.com/gulpjs/remove-bom-stream#readme
- Issues: https://github.com/gulpjs/remove-bom-stream/issues
- npm.io page: https://npm.io/package/remove-bom-stream

## Dependencies (1)

- [streamx](https://npm.io/package/streamx.md) ^2.12.4

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-04-19
- 1.2.0 — 2017-07-05
- 1.1.0 — 2017-06-17
- 1.0.0 — 2017-06-16

## README

<p align="center">
  <a href="https://gulpjs.com">
    <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
  </a>
</p>

# remove-bom-stream

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

Remove a UTF8 BOM at the start of the stream.

## Usage

```js
var fs = require('fs');
var concat = require('concat-stream');
var removeBOM = require('remove-bom-stream');

fs.createReadStream('utf8-file-with-bom.txt')
  .pipe(removeBOM('utf-8'))
  .pipe(
    concat(function (result) {
      // result won't have a BOM
    })
  );
```

## API

### `removeBOM(encoding)`

Returns a `Transform` stream that will remove a BOM, if the argument `encoding` is `'utf-8'` and the given data is a UTF8 Buffer with a BOM at the beginning. If the `encoding` is not `'utf-8'` or does not have a BOM, the data is not changed and this becomes a no-op `Transform` stream.

## License

MIT

<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/remove-bom-stream.svg?style=flat-square
[npm-url]: https://npmjs.com/package/remove-bom-stream
[npm-image]: https://img.shields.io/npm/v/remove-bom-stream.svg?style=flat-square

[ci-url]: https://github.com/gulpjs/remove-bom-stream/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/remove-bom-stream/dev?style=flat-square

[coveralls-url]: https://coveralls.io/r/gulpjs/remove-bom-stream
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/remove-bom-stream/master.svg?style=flat-square
<!-- prettier-ignore-end -->

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