index.js 279 B

1234567891011121314
  1. 'use strict';
  2. var firstChunk = require('first-chunk-stream');
  3. var stripBom = require('strip-bom');
  4. module.exports = function () {
  5. return firstChunk({chunkLength: 3}, function (err, chunk, enc, cb) {
  6. if (err) {
  7. cb(err);
  8. return;
  9. }
  10. cb(null, stripBom(chunk));
  11. });
  12. };