wishthis/node_modules/strip-bom-stream/index.js
2022-01-21 09:28:41 +01:00

13 lines
269 B
JavaScript

'use strict';
const firstChunk = require('first-chunk-stream');
const stripBomBuf = require('strip-bom-buf');
module.exports = () =>
firstChunk({chunkLength: 3}, (err, chunk, enc, cb) => {
if (err) {
cb(err);
return;
}
cb(null, stripBomBuf(chunk));
});