css-analysis-diffstat
Get a git-like diffstat from a css-analyzer-diff and see how much your stats have changed.
Installation
npm install css-analysis-diffstat
Usage
const cssAnalysisDiffStat = // Diff calculated by https://github.com/bartveneman/css-analyzer-diffconst cssAnalyzerDiff = 'colors.total': oldValue: 2 newValue: 4 changed: true diff: absolute: 2 relative: 1 'rules.total': oldValue: 4 newValue: 2 changed: true diff: absolute: -2 relative: -05 'declarations.importants.total': oldValue: 1 newValue: 0 changed: true diff: absolute: -1 relative: -1 'selectors.identifiers.max.value': oldValue: 'oldValue' newValue: 'newValue' changed: true 'colors.unique': value: 'red' added: true changed: true removed: false value: 'blue' added: false changed: false removed: false const diffStat = // => changes: 5 additions: 4 deletions: 4 changeRatio: 08 additionRatio: 05 deletionRatio: 05
Related projects
- CSS Analyzer Analytics for CSS
- css-analyzer-diff Calculate the difference between two sets of CSS stats