Skip to content

Commit ec2f75d

Browse files
committed
verify
1 parent f6ccb9b commit ec2f75d

File tree

1 file changed

+14
-13
lines changed
  • lib/node_modules/@stdlib/stats/incr/nanskewness/lib

1 file changed

+14
-13
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ var incrskewness = require( '@stdlib/stats/incr/skewness' );
2525

2626

2727
// MAIN //
28+
2829
/**
29-
* Returns an accumulator function which incrementally computes a corrected sample skewness, **ignoring NaN values**.
30+
* Returns an accumulator function which incrementally computes a corrected sample skewness while **ignoring NaN values**.
3031
*
3132
* @returns {Function} accumulator function
3233
*
@@ -52,24 +53,24 @@ var incrskewness = require( '@stdlib/stats/incr/skewness' );
5253
* // returns ~0.492
5354
*/
5455
function incrnanskewness() {
55-
var acc = incrskewness(); // Use the standard skewness accumulator
56+
var acc = incrskewness(); // Use the standard skewness accumulator
5657

5758
/**
58-
* If provided a value, the accumulator function returns an updated corrected sample skewness. If not provided a value, the accumulator function returns the current corrected sample skewness.
59+
* If provided a value, the accumulator function returns an updated corrected sample skewness.
60+
* If not provided a value, the function returns the current corrected sample skewness.
5961
*
60-
* @private
6162
* @param {number} [x] - new value
6263
* @returns {(number|null)} corrected sample skewness or null
6364
*/
64-
return function accumulator( x ) {
65-
if ( arguments.length === 0 ) {
66-
return acc(); // Return the current skewness
67-
}
68-
if ( isnan( x ) ) {
69-
return acc(); // Ignore NaN and return the current skewness
70-
}
71-
return acc( x ); // Update skewness with a valid number
72-
};
65+
return function accumulator( x ) {
66+
if ( arguments.length === 0 ) {
67+
return acc(); // Return current skewness if no input is provided
68+
}
69+
if ( isnan( x ) ) {
70+
return acc(); // Ignore NaN values and return the current skewness
71+
}
72+
return acc( x ); // Update skewness with a valid number
73+
};
7374
}
7475

7576

0 commit comments

Comments
 (0)