@@ -23,11 +23,11 @@ var total_ops = new metrics.Histogram.createUniformHistogram();
23
23
24
24
console . log ( 'Comparing before,' , file1 , '(' , before_lines . length , 'lines)' , 'to after,' , file2 , '(' , after_lines . length , 'lines)' ) ;
25
25
26
- function is_whitespace ( s ) {
26
+ function is_whitespace ( s ) {
27
27
return ! ! s . trim ( ) ;
28
28
}
29
29
30
- function pad ( input , len , chr , right ) {
30
+ function pad ( input , len , chr , right ) {
31
31
var str = input . toString ( ) ;
32
32
chr = chr || ' ' ;
33
33
@@ -44,20 +44,20 @@ function pad(input, len, chr, right) {
44
44
}
45
45
46
46
// green if greater than 0, red otherwise
47
- function humanize_diff ( num , unit , toFixed ) {
47
+ function humanize_diff ( num , unit , toFixed ) {
48
48
unit = unit || '' ;
49
49
if ( num > 0 ) {
50
50
return ' +' + pad ( num . toFixed ( toFixed || 0 ) + unit , 7 ) ;
51
51
}
52
52
return ' -' + pad ( Math . abs ( num ) . toFixed ( toFixed || 0 ) + unit , 7 ) ;
53
53
}
54
54
55
- function command_name ( words ) {
55
+ function command_name ( words ) {
56
56
var line = words . join ( ' ' ) ;
57
57
return line . substr ( 0 , line . indexOf ( ',' ) ) ;
58
58
}
59
59
60
- before_lines . forEach ( function ( b , i ) {
60
+ before_lines . forEach ( function ( b , i ) {
61
61
var a = after_lines [ i ] ;
62
62
if ( ! a || ! b || ! b . trim ( ) || ! a . trim ( ) ) {
63
63
// console.log('#ignored#', '>'+a+'<', '>'+b+'<');
@@ -66,10 +66,10 @@ before_lines.forEach(function(b, i) {
66
66
var b_words = b . split ( ' ' ) . filter ( is_whitespace ) ;
67
67
var a_words = a . split ( ' ' ) . filter ( is_whitespace ) ;
68
68
69
- var ops = [ b_words , a_words ] . map ( function ( words ) {
69
+ var ops = [ b_words , a_words ] . map ( function ( words ) {
70
70
// console.log(words);
71
71
return words . slice ( - 2 , - 1 ) | 0 ;
72
- } ) . filter ( function ( num ) {
72
+ } ) . filter ( function ( num ) {
73
73
var isNaN = ! num && num !== 0 ;
74
74
return ! isNaN ;
75
75
} ) ;
0 commit comments