From d9b40a056b43445d3c8017267cfdfdcef494ea1b Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Sat, 24 Jan 2026 13:29:07 +0530 Subject: [PATCH] chore: array literal with push --- 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: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - 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/stats/ranks/benchmark/benchmark.js | 6 +++--- lib/node_modules/@stdlib/stats/ranks/lib/order.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js index d6ef7b0a6ff8..05acdbfde97d 100644 --- a/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/ranks/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,10 +35,10 @@ bench( pkg, function benchmark( b ) { var len; var i; - arr = new Array( 100 ); + arr = []; len = arr.length; for ( i = 0; i < len; i++ ) { - arr[ i ] = ( randu()*100.0 ) - 50.0; + arr.push( ( randu()*100.0 ) - 50.0 ); } b.tic(); diff --git a/lib/node_modules/@stdlib/stats/ranks/lib/order.js b/lib/node_modules/@stdlib/stats/ranks/lib/order.js index d4cbee935782..742818b77c67 100644 --- a/lib/node_modules/@stdlib/stats/ranks/lib/order.js +++ b/lib/node_modules/@stdlib/stats/ranks/lib/order.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2026 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,9 +52,9 @@ function order( x ) { var arr; var i; - arr = new Array( x.length ); + arr = []; for ( i = 0; i < x.length; i++ ) { - arr[ i ] = i; + arr.push( i ); } return arr.sort( compare );