File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,13 @@ analyze('foo {}')
182182// }
183183```
184184
185- ## License
185+ ## Related projects
186186
187- MIT © Bart Veneman
187+ - [ Wallace] ( https://github.com/bartveneman/wallace-cli ) - CLI tool for
188+ @projectwallace/css-analyzer
189+ - [ CSS Analyzer Diff] ( https://github.com/bartveneman/css-analyzer-diff ) -
190+ Calculates the diff between two sets of CSS analysis
191+ - [ Gromit] ( https://github.com/bartveneman/gromit-cli ) - A test framework to assert
192+ that CSS doesn't exceeds certain thresholds
193+ - [ Color Sorter] ( https://github.com/bartveneman/color-sorter ) - Sort CSS colors
194+ by hue, saturation, lightness and opacity
Original file line number Diff line number Diff line change @@ -16,9 +16,13 @@ module.exports = selectors => {
1616 . reduce ( ( prev , curr ) => prev + curr , 0 )
1717 const average = totalIdentifiers / totalSelectors
1818
19- const top = function ( count ) {
20- const sorter = function ( a , b ) {
21- return a . identifiers > b . identifiers ? - 1 : 1
19+ const top = ( count ) => {
20+ const sorter = ( a , b ) => {
21+ if ( a . identifiers === b . identifiers ) {
22+ return a . selector . localeCompare ( b . selector )
23+ }
24+
25+ return b . identifiers - a . identifiers
2226 }
2327
2428 return identifiersPerSelector
You can’t perform that action at this time.
0 commit comments