Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonschlinkert/remove-bom-buffer
Strip a byte order mark (BOM) from a buffer.
https://github.com/jonschlinkert/remove-bom-buffer
bom buffer byte-order-mark remove remove-bom strip strip-bom
Last synced: 12 days ago
JSON representation
Strip a byte order mark (BOM) from a buffer.
- Host: GitHub
- URL: https://github.com/jonschlinkert/remove-bom-buffer
- Owner: jonschlinkert
- License: mit
- Created: 2015-10-10T10:10:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-24T23:55:13.000Z (almost 5 years ago)
- Last Synced: 2024-05-01T22:16:58.195Z (7 months ago)
- Topics: bom, buffer, byte-order-mark, remove, remove-bom, strip, strip-bom
- Language: JavaScript
- Size: 16.6 KB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remove-bom-buffer [![NPM version](https://img.shields.io/npm/v/remove-bom-buffer.svg?style=flat)](https://www.npmjs.com/package/remove-bom-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/remove-bom-buffer.svg?style=flat)](https://npmjs.org/package/remove-bom-buffer) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/remove-bom-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/remove-bom-buffer)
> Remove a byte order mark (BOM) from a buffer.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save remove-bom-buffer
```## Usage
```js
var remove = require('remove-bom-buffer');
remove(new Buffer('\ufefffoo'));
```## About
### Related projects
* [cr](https://www.npmjs.com/package/cr): Strip windows carriage returns, or convert carriage returns to newlines. | [homepage](https://github.com/jonschlinkert/cr "Strip windows carriage returns, or convert carriage returns to newlines.")
* [has-bom](https://www.npmjs.com/package/has-bom): Returns true if a buffer or string has a byte order mark (BOM) | [homepage](https://github.com/jonschlinkert/has-bom "Returns true if a buffer or string has a byte order mark (BOM)")
* [read-file](https://www.npmjs.com/package/read-file): Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding… [more](https://github.com/jonschlinkert/read-file) | [homepage](https://github.com/jonschlinkert/read-file "Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order marks when `utf8` encoding is chosen. Also optionally replaces windows newlines with unix newlines.")
* [strip-bom-string](https://www.npmjs.com/package/strip-bom-string): Strip a byte order mark (BOM) from a string. | [homepage](https://github.com/jonschlinkert/strip-bom-string "Strip a byte order mark (BOM) from a string.")### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 16, 2017._