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
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.
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
$ npm install --save stripbom
const stripBom = require('stripbom'); stripBom('\uFEFFunicorn'); //=> 'unicorn'
StripBOM is licensed under the MIT license.