Skip to content

Commit cdbdb43

Browse files
committed
Fixed linting errors
1 parent a35a9be commit cdbdb43

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

lib/node_modules/@stdlib/stats/incr/nanmaxabs/examples/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
'use strict';
2020

2121
var randu = require( '@stdlib/random/base/randu' );
22-
var incrnanmaxabs = require( './../lib' );
2322
var isnan = require( '@stdlib/math/base/assert/is-nan' );
23+
var incrnanmaxabs = require( './../lib' );
2424

2525
var accumulator;
2626
var max;
@@ -33,8 +33,13 @@ accumulator = incrnanmaxabs();
3333
// For each simulated datum, update the max absolute value...
3434
console.log( '\nValue\tMaxAbs\n' );
3535
for ( i = 0; i < 100; i++ ) {
36-
v = ( randu() < 0.2 ) ? NaN : (randu() * 100.0) - 50.0;
36+
if ( randu() < 0.2 ) {
37+
v = NaN;
38+
}
39+
else {
40+
v = ( randu() * 100.0 ) - 50.0;
41+
}
3742
max = accumulator( v );
38-
console.log( '%d\t%d', isnan(v) ? 'NaN' : v.toFixed( 3 ), max.toFixed( 3 ) );
43+
console.log( '%d\t%d', ( isnan(v) ) ? 'NaN' : v.toFixed( 3 ), max.toFixed( 3 ) );
3944
}
4045
console.log( '\nFinal maximum absolute value: %d\n', accumulator() );

lib/node_modules/@stdlib/stats/incr/nanmaxabs/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
// MODULES //
4848

49-
var main = require( '@stdlib/stats/incr/nanmaxabs/lib/main.js' );
49+
var main = require( './main.js' );
5050

5151

5252
// EXPORTS //

lib/node_modules/@stdlib/stats/incr/nanmaxabs/lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var incrmaxabs = require( '@stdlib/stats/incr/maxabs' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525

26+
2627
// MAIN //
2728

2829
/**

lib/node_modules/@stdlib/stats/incr/nanmaxabs/test/test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ tape( 'the accumulator function incrementally computes a maximum absolute value'
5959
data = [ 2.0, -3.0, NaN, 2.0, -4.0, NaN, 3.0, 4.0 ];
6060
N = data.length;
6161

62-
expected = new Array( N );
63-
actual = new Array( N );
62+
expected = [];
63+
actual = [];
6464

6565
acc = incrmaxabs();
6666

@@ -71,8 +71,8 @@ tape( 'the accumulator function incrementally computes a maximum absolute value'
7171
if ( ad > max ) {
7272
max = ad;
7373
}
74-
expected[ i ] = max;
75-
actual[ i ] = acc( d );
74+
expected.push(max);
75+
actual.push(acc( d ));
7676
}
7777
t.deepEqual( actual, expected, 'returns expected incremental results' );
7878
t.end();
@@ -109,4 +109,3 @@ tape( 'the accumulator function correctly handles signed zeros', function test(
109109

110110
t.end();
111111
});
112-

0 commit comments

Comments
 (0)