streamFile.js 248 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 'use strict'; var fs = require('graceful-fs'); var stripBom = require('strip-bom'); function streamFile(file, cb) { file.contents = fs.createReadStream(file.path) .pipe(stripBom.stream()); cb(null, file); } module.exports = streamFile;