Skip to content

Commit dcbe15b

Browse files
committed
refactor: inline expression rather than create intermediate variable
--- 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: 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent d1ff8b2 commit dcbe15b

File tree

1 file changed

+1
-5
lines changed
  • lib/node_modules/@stdlib/ndarray/base/every-by/lib

1 file changed

+1
-5
lines changed

lib/node_modules/@stdlib/ndarray/base/every-by/lib/main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ function everyBy( arrays, predicate, thisArg ) {
179179
var ndims;
180180
var shx;
181181
var iox;
182-
var len;
183182
var x;
184183

185184
// Unpack the ndarray and standardize ndarray meta data:
@@ -194,11 +193,8 @@ function everyBy( arrays, predicate, thisArg ) {
194193
}
195194
return EVERY[ ndims ]( x, predicate, thisArg );
196195
}
197-
// Compute the number of elements:
198-
len = numel( shx );
199-
200196
// Check whether we were provided an empty ndarray...
201-
if ( len === 0 ) {
197+
if ( numel( shx ) === 0 ) {
202198
return true;
203199
}
204200
// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...

0 commit comments

Comments
 (0)