Skip to content

Commit d73f206

Browse files
committed
style: wrap ternary conditions in parentheses in stats/incr examples
Wrap the `isnan` ternary conditions in the nanmmin and nanmrss example files to satisfy the stdlib/ternary-condition-parentheses lint rule. Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com> --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9fc1615 commit d73f206

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/stats/incr

‎lib/node_modules/@stdlib/stats/incr/nanmmin/examples/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ console.log( '\nValue\tMin\n' );
3535
for ( i = 0; i < 100; i++ ) {
3636
v = ( randu() < 0.1 ) ? NaN : randu() * 100.0;
3737
m = accumulator( v );
38-
console.log( '%s\t%s', isnan( v ) ? 'NaN' : v.toFixed( 4 ), ( m === null ) ? 'null' : m.toFixed( 4 ) );
38+
console.log( '%s\t%s', ( isnan( v ) ) ? 'NaN' : v.toFixed( 4 ), ( m === null ) ? 'null' : m.toFixed( 4 ) );
3939
}

‎lib/node_modules/@stdlib/stats/incr/nanmrss/examples/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ for ( i = 0; i < 100; i++ ) {
3838
v1 = ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 );
3939
v2 = ( bernoulli( 0.8 ) < 1 ) ? NaN : uniform( 0.0, 100.0 );
4040
rss = accumulator( v1, v2 );
41-
console.log( '%s\t%s\t%s', isnan( v1 ) ? 'NaN' : v1.toFixed( 3 ), isnan( v2 ) ? 'NaN' : v2.toFixed( 3 ), ( rss === null ) ? 'null' : rss.toFixed( 3 ) );
41+
console.log( '%s\t%s\t%s', ( isnan( v1 ) ) ? 'NaN' : v1.toFixed( 3 ), ( isnan( v2 ) ) ? 'NaN' : v2.toFixed( 3 ), ( rss === null ) ? 'null' : rss.toFixed( 3 ) );
4242
}

0 commit comments

Comments
 (0)