Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strip-bom-stream

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-bom-stream - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

14

index.d.ts

@@ -1,6 +0,4 @@

import FirstChunkStream = require('first-chunk-stream');
import FirstChunkStream from 'first-chunk-stream';
declare namespace stripBomStream {
type StripBomStream = FirstChunkStream;
}
export type StripBomStream = FirstChunkStream;

@@ -12,4 +10,4 @@ /**

```
import * as fs from 'fs';
import stripBomStream = require('strip-bom-stream');
import fs from 'node:fs';
import stripBomStream from 'strip-bom-stream';

@@ -21,4 +19,2 @@ fs.createReadStream('unicorn.txt')

*/
declare function stripBomStream(): stripBomStream.StripBomStream;
export = stripBomStream;
export default function stripBomStream(): StripBomStream;

@@ -1,13 +0,6 @@

'use strict';
const FirstChunkStream = require('first-chunk-stream');
const stripBomBuffer = require('strip-bom-buf');
import FirstChunkStream from 'first-chunk-stream';
import stripBomBuffer from 'strip-bom-buf';
module.exports = () =>
new FirstChunkStream({chunkLength: 3}, (error, chunk, encoding, callback) => {
if (error) {
callback(error);
return;
}
callback(null, stripBomBuffer(chunk));
});
export default function stripBomStream() {
return new FirstChunkStream({chunkSize: 3}, (chunk, _encoding) => stripBomBuffer(chunk));
}
{
"name": "strip-bom-stream",
"version": "4.0.0",
"version": "5.0.0",
"description": "Strip UTF-8 byte order mark (BOM) from a stream",
"license": "MIT",
"repository": "sindresorhus/strip-bom-stream",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=8"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},

@@ -38,12 +41,12 @@ "scripts": {

"dependencies": {
"first-chunk-stream": "^3.0.0",
"strip-bom-buf": "^2.0.0"
"first-chunk-stream": "^5.0.0",
"strip-bom-buf": "^3.0.0"
},
"devDependencies": {
"@types/node": "^12.0.0",
"ava": "^1.4.1",
"get-stream": "^5.1.0",
"tsd": "^0.7.3",
"xo": "^0.24.0"
"@types/node": "^16.6.1",
"ava": "^3.15.0",
"get-stream": "^6.0.1",
"tsd": "^0.17.0",
"xo": "^0.44.0"
}
}

@@ -1,2 +0,2 @@

# strip-bom-stream [![Build Status](https://travis-ci.org/sindresorhus/strip-bom-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom-stream)
# strip-bom-stream

@@ -9,3 +9,2 @@ > Strip UTF-8 [byte order mark](https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a stream

## Install

@@ -17,8 +16,7 @@

## Usage
```js
const fs = require('fs');
const stripBomStream = require('strip-bom-stream');
import fs from 'node:fs';
import stripBomStream from 'strip-bom-stream';

@@ -32,3 +30,2 @@ fs.createReadStream('unicorn.txt')

## Related

@@ -38,6 +35,1 @@

- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc