From 068e451b5465d8ac722dbd2a736ae237be8fd7db Mon Sep 17 00:00:00 2001 From: rasim Date: Wed, 5 Nov 2025 15:25:19 +0530 Subject: [PATCH 1/2] chore: fix JavaScript lint errors (issue #8390) --- 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 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: passed - 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 --- --- lib/node_modules/@stdlib/utils/some-by/examples/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/some-by/examples/index.js b/lib/node_modules/@stdlib/utils/some-by/examples/index.js index c8b3bd57c25a..a02b03141f2c 100644 --- a/lib/node_modules/@stdlib/utils/some-by/examples/index.js +++ b/lib/node_modules/@stdlib/utils/some-by/examples/index.js @@ -29,9 +29,10 @@ var bool; var arr; var i; -arr = new Array( 100 ); -for ( i = 0; i < arr.length; i++ ) { - arr[ i ] = randu(); +arr = []; + +for ( i = 0; i < 100; i++ ) { + arr.push( randu() ); } bool = someBy( arr, 5, threshold ); From 494ba5011fc0d2f922e9f432f8ef4068d530cf98 Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 5 Nov 2025 18:21:57 -0800 Subject: [PATCH 2/2] docs: update example Signed-off-by: Athan --- .../@stdlib/utils/some-by/examples/index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/some-by/examples/index.js b/lib/node_modules/@stdlib/utils/some-by/examples/index.js index a02b03141f2c..523ea2fda076 100644 --- a/lib/node_modules/@stdlib/utils/some-by/examples/index.js +++ b/lib/node_modules/@stdlib/utils/some-by/examples/index.js @@ -18,22 +18,14 @@ 'use strict'; -var randu = require( '@stdlib/random/base/randu' ); +var uniform = require( '@stdlib/random/array/uniform' ); var someBy = require( './../lib' ); function threshold( value ) { return ( value > 0.95 ); } -var bool; -var arr; -var i; +var arr = uniform( 100, 0.0, 1.0 ); -arr = []; - -for ( i = 0; i < 100; i++ ) { - arr.push( randu() ); -} - -bool = someBy( arr, 5, threshold ); +var bool = someBy( arr, 5, threshold ); console.log( bool );