1 Debian patch touch this file
-
Update for node-fix-for-first-chunk-stream 4
- Author
- Xavier Guimard <[email protected]>
- Forwarded
- https://github.com/sindresorhus/strip-bom-stream/issues/4
| 1 | 'use strict'; |
| 2 | const FirstChunkStream = require('first-chunk-stream'); |
| 3 | const stripBomBuffer = require('strip-bom-buf'); |
| 4 | |
| 5 | module.exports = () => |
| 6 | new FirstChunkStream({chunkLength: 3}, (error, chunk, encoding, callback) => { |
| 7 | if (error) { |
| 8 | callback(error); |
| 9 | return; |
| 10 | } |
| 11 | |
| 12 | callback(null, stripBomBuffer(chunk)); |
| 13 | }); |