Skip to content

Commit f389a19

Browse files
committed
refactor: remove unnecessary 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 e83fc9a commit f389a19

File tree

1 file changed

+6
-7
lines changed
  • lib/node_modules/@stdlib/array/base/zip2views/lib

1 file changed

+6
-7
lines changed

lib/node_modules/@stdlib/array/base/zip2views/lib/main.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ function zip2views( arrays, labels ) {
8484
var M;
8585
var N;
8686
var i;
87-
var j;
8887

8988
M = arrays.length;
9089
if ( M < 1 ) {
@@ -97,8 +96,8 @@ function zip2views( arrays, labels ) {
9796
}
9897
// Resolve element accessors...
9998
acc = [];
100-
for ( j = 0; j < M; j++ ) {
101-
acc.push( accessors( list[ j ] ).accessors );
99+
for ( i = 0; i < M; i++ ) {
100+
acc.push( accessors( list[ i ] ).accessors );
102101
}
103102
// Create a copy of provided labels to prevent external mutation:
104103
keys = copy( labels );
@@ -118,10 +117,10 @@ function zip2views( arrays, labels ) {
118117
}
119118

120119
// Define read/write accessors for each label...
121-
for ( j = 0; j < M; j++ ) {
122-
getter = getValue( list[ j ], acc[ j ][ 0 ] );
123-
setter = setValue( list[ j ], acc[ j ][ 1 ] );
124-
setReadWriteAccessor( Datum.prototype, keys[ j ], getter, setter );
120+
for ( i = 0; i < M; i++ ) {
121+
getter = getValue( list[ i ], acc[ i ][ 0 ] );
122+
setter = setValue( list[ i ], acc[ i ][ 1 ] );
123+
setReadWriteAccessor( Datum.prototype, keys[ i ], getter, setter );
125124
}
126125
// Ensure that the returned array correctly serializes to JSON:
127126
setNonEnumerableReadOnly( Datum.prototype, 'toJSON', toJSON );

0 commit comments

Comments
 (0)