strip-bom-buf

2018-10-13 admin

strip-bom-buf是什么

什么是strip-bom-buf,Strip UTF-8 byte order mark (BOM) from a buffer

strip-bom-buf使用教程帮助文档

strip-bom-buf Build Status

Strip UTF-8 byte order mark (BOM) from a buffer

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.

Install

$ npm install --save strip-bom-buf

Usage

const fs = require('fs');
const stripBomBuf = require('strip-bom-buf');

stripBomBuf(fs.readFileSync('unicorn.txt'));
//=> 'unicorn'

Related

License

MIT © Sindre Sorhus

你可能感兴趣的文章:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-42609.html

文章标题:strip-bom-buf

回到顶部