mirror of
https://github.com/wishthis/wishthis.git
synced 2026-01-02 20:28:22 -05:00
14 lines
320 B
JavaScript
14 lines
320 B
JavaScript
'use strict';
|
|
const FirstChunkStream = require('first-chunk-stream');
|
|
const stripBomBuffer = require('strip-bom-buf');
|
|
|
|
module.exports = () =>
|
|
new FirstChunkStream({chunkLength: 3}, (error, chunk, encoding, callback) => {
|
|
if (error) {
|
|
callback(error);
|
|
return;
|
|
}
|
|
|
|
callback(null, stripBomBuffer(chunk));
|
|
});
|