Skip to content

Commit cf12b0c

Browse files
committed
chore: replace new Array() with array literal in zip.js
Replace new Array() constructor with array literal and use push() method to comply with no-new-array ESLint rule. Closes #9867 --- --- 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: 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 ee4e852 commit cf12b0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/plot/components/svg/path/lib/render/utils

lib/node_modules/@stdlib/plot/components/svg/path/lib/render/utils/zip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ function zip( x, y ) {
4040
if ( x.length !== y.length ) {
4141
throw new Error( format( 'invalid arguments. Must provide equal length array-like objects. x length: `%u`. y length: `%u`.', x.length, y.length ) );
4242
}
43-
out = new Array( x.length );
43+
out = [];
4444
for ( i = 0; i < x.length; i++ ) {
45-
out[ i ] = [ x[i], y[i] ];
45+
out.push( [ x[i], y[i] ] );
4646
}
4747
return out;
4848
}

0 commit comments

Comments
 (0)