README.md (3166B)
1 # strip-bom-string [![NPM version](https://img.shields.io/npm/v/strip-bom-string.svg?style=flat)](https://www.npmjs.com/package/strip-bom-string) [![NPM monthly downloads](https://img.shields.io/npm/dm/strip-bom-string.svg?style=flat)](https://npmjs.org/package/strip-bom-string) [![NPM total downloads](https://img.shields.io/npm/dt/strip-bom-string.svg?style=flat)](https://npmjs.org/package/strip-bom-string) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/strip-bom-string.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/strip-bom-string) 2 3 > Strip a byte order mark (BOM) from a string. 4 5 ## Install 6 7 Install with [npm](https://www.npmjs.com/): 8 9 ```sh 10 $ npm install --save strip-bom-string 11 ``` 12 13 ## Usage 14 15 ```js 16 var strip = require('strip-bom-string'); 17 strip('\ufefffoo'); 18 //=> 'foo' 19 ``` 20 21 ## About 22 23 ### Related projects 24 25 * [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.") 26 * [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)") 27 * [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.") 28 * [strip-bom-buffer](https://www.npmjs.com/package/strip-bom-buffer): Strip a byte order mark (BOM) from a buffer. | [homepage](https://github.com/jonschlinkert/strip-bom-buffer "Strip a byte order mark (BOM) from a buffer.") 29 30 ### Contributing 31 32 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). 33 34 ### Building docs 35 36 _(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.)_ 37 38 To generate the readme, run the following command: 39 40 ```sh 41 $ npm install -g verbose/verb#dev verb-generate-readme && verb 42 ``` 43 44 ### Running tests 45 46 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: 47 48 ```sh 49 $ npm install && npm test 50 ``` 51 52 ### Author 53 54 **Jon Schlinkert** 55 56 * [github/jonschlinkert](https://github.com/jonschlinkert) 57 * [twitter/jonschlinkert](https://twitter.com/jonschlinkert) 58 59 ### License 60 61 Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). 62 Released under the [MIT License](LICENSE). 63 64 *** 65 66 _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._