stripbom
v3.0.0
Published
Strip UTF-8 byte order mark (BOM) from a string. Works in all node versions
Downloads
2,881
Maintainers
Readme
stripbom
Strip UTF-8 byte order mark (BOM) from a string. Works in all node versions.
Strip UTF-8 byte order mark (BOM) from a string
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.
Why
Starting version 3.x of npmjs.com/strip-bom doesn't support node below v4, and previous versions have security issues, so this brings all the happiness to those who are still in supporting older versions of node business
Install
$ npm install --save stripbom
Usage
const stripBom = require('stripbom');
stripBom('\uFEFFunicorn');
//=> 'unicorn'
License
StripBOM is licensed under the MIT license.