code: function analyzePatch(patch) {
    const patchLines = patch.split('\n').reduce((reducedPatch, currentLine) => {
      if (currentLine.match(/^[-+]/)) {
        return reducedPatch.concat(currentLine.replace(/^[-+]+\s*/, ''));
      }
      return reducedPatch;
    }, []);
    return {
      lines: patchLines.length,
      chars: patchLines.join('').length
    };
  }
docs: Reduce a patch down to just changed lines
  @param  {String} patch The complete patch with surrounding context
  @return {Object}       Stats about the changed lines