strip-bom-buf

WebJar for strip-bom-buf

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

strip-bom-buf
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

strip-bom-buf
WebJar for strip-bom-buf
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/strip-bom-buf

Download strip-bom-buf

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/strip-bom-buf/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>strip-bom-buf</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/strip-bom-buf/
implementation 'org.webjars.npm:strip-bom-buf:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/strip-bom-buf/
implementation ("org.webjars.npm:strip-bom-buf:1.0.0")
'org.webjars.npm:strip-bom-buf:jar:1.0.0'
<dependency org="org.webjars.npm" name="strip-bom-buf" rev="1.0.0">
  <artifact name="strip-bom-buf" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='strip-bom-buf', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "strip-bom-buf" % "1.0.0"
[org.webjars.npm/strip-bom-buf "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : is-utf8 jar [0.2.1,0.3)

Project Modules

There are no modules declared in this project.

strip-bom-buf

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 strip-bom-buf

Usage

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

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

Related

License

MIT © Sindre Sorhus

Versions

Version
1.0.0