Socket
Book a DemoInstallSign in
Socket

has-bom

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-bom

Returns true if a buffer or string has a byte order mark (BOM)

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

has-bom NPM version

Returns true if a buffer or string has a byte order mark (BOM)

Install

Install with npm

$ npm i has-bom --save

Usage

var hasBom = require('has-bom');

hasBom('\ufefffoo');
//=> true
hasBom(new Buffer('\ufefffoo'));
//=> true

hasBom('foo');
//=> false
hasBom(new Buffer('foo'));
//=> false
  • cr: Strip windows carriage returns, or convert carriage returns to newlines. | homepage
  • strip-bom-buffer: Strip a byte order mark (BOM) from a buffer. | homepage
  • strip-bom-string: Strip a byte order mark (BOM) from a string. | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on October 10, 2015.

Keywords

bom

FAQs

Package last updated on 10 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts