【文件属性】:
文件名称:strip-bom-buf:从缓冲区中剥离UTF-8字节顺序标记(BOM)
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-26 08:03:53
JavaScript
脱衣舞娘
从缓冲区中剥离UTF-8(BOM)
从*:
Unicode标准允许使用UTF-8中的BOM,但既不需要也不建议使用它。 字节顺序在UTF-8中没有意义。
安装
$ npm install strip-bom-buf
用法
const fs = require ( 'fs' ) ;
const stripBomBuffer = require ( 'strip-bom-buf' ) ;
stripBomBuffer ( fs . readFileSync ( 'unicorn.txt' ) ) ;
//=> 'unicorn'
有关的
此模块的字符串版本
此模块的流版本
执照
麻省理工学院:copyright:
【文件预览】:
strip-bom-buf-main
----index.js(320B)
----package.json(731B)
----index.test-d.ts(165B)
----readme.md(748B)
----.github()
--------workflows()
----test()
--------fixture-utf16be(20B)
--------fixture-utf16le(20B)
--------test.js(710B)
--------fixture-utf8(11B)
----license(1KB)
----index.d.ts(382B)
----.gitignore(23B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)