Debian Codegraph @

debian/patches/fix-for-first-chunk-stream-4.diff

raw
1 Description: Update for node-fix-for-first-chunk-stream 4
2 Author: Xavier Guimard <[email protected]>
3 Forwarded: https://github.com/sindresorhus/strip-bom-stream/issues/4
4 Last-Update: 2020-02-14
5
6 --- a/index.js
7 +++ b/index.js
8 @@ -3,11 +3,6 @@
9 const stripBomBuffer = require('strip-bom-buf');
10
11 module.exports = () =>
12 - new FirstChunkStream({chunkLength: 3}, (error, chunk, encoding, callback) => {
13 - if (error) {
14 - callback(error);
15 - return;
16 - }
17 -
18 - callback(null, stripBomBuffer(chunk));
19 + new FirstChunkStream({chunkSize: 3}, async (chunk, encoding) => {
20 + return stripBomBuffer(chunk);
21 });