code: function gulpInjectStringifiedHtml(params) {
  
    // create and return a stream through which each file will pass
    return through.obj(function (file, enc, cb) {
  
      if (file.isNull()) {
        return cb(null, file);
      }
  
      if (file.isStream()) {
        file.contents = file.contents.pipe(new bufferstreams(function (err, buf, cb) {
          if (err) throw err;
          cb(null, doInjectHtml(buf.toString(), file, params));
        }));
        cb(null, file);
      }
  
      if (file.isBuffer()) {
        file.contents = doInjectHtml(file.contents.toString(), file, params);
        cb(null, file);
      }
  
    });
  }
docs: gulp plugin