through.obj((file, enc, next) => { if (file.isNull() || file.isDirectory()) { next(null, file); return; } if (!some(file.extname, file.history[0])) { next(null, file); return; } file.$ = cheerio.load(file.contents.toString(), options); next(null, file); })