function formatFilter()

in index.js [23:32]


  function formatFilter(file, enc, done) {
    function onClangFormatFinished() {
      file.contents = Buffer.from(formatted, 'utf-8');
      done(null, file);
    }
    var formatted = '';
    actualClangFormat(file, enc, optsStr, onClangFormatFinished)
        .on('data', function(b) { formatted += b.toString(); })
        .on('error', this.emit.bind(this, 'error'));
  }