Skip to content

Commit 2b5e5c6

Browse files
committed
fix: account for edge case where n <= 0
--- 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: passed - 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 a3e7978 commit 2b5e5c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+40
-61
lines changed

lib/node_modules/@stdlib/ndarray/base/some-by/lib/10d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function some10d( x, n, predicate, thisArg ) { // eslint-disable-line max-statem
193193
for ( i0 = 0; i0 < S0; i0++ ) {
194194
if ( predicate.call( thisArg, xbuf[ ix ], take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
195195
count += 1;
196-
if ( count === n ) {
196+
if ( count >= n ) {
197197
return true;
198198
}
199199
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/10d_accessors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function some10d( x, n, predicate, thisArg ) { // eslint-disable-line max-statem
200200
for ( i0 = 0; i0 < S0; i0++ ) {
201201
if ( predicate.call( thisArg, get( xbuf, ix ), take( [ i9, i8, i7, i6, i5, i4, i3, i2, i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
202202
count += 1;
203-
if ( count === n ) {
203+
if ( count >= n ) {
204204
return true;
205205
}
206206
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/10d_blocked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ function blockedsome10d( x, n, predicate, thisArg ) { // eslint-disable-line max
281281
for ( i0 = 0; i0 < s0; i0++ ) {
282282
if ( predicate.call( thisArg, xbuf[ ix ], take( [ j9+i9, j8+i8, j7+i7, j6+i6, j5+i5, j4+i4, j3+i3, j2+i2, j1+i1, j0+i0 ], idx ), x.ref ) ) {
283283
count += 1;
284-
if ( count === n ) {
284+
if ( count >= n ) {
285285
return true;
286286
}
287287
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/10d_blocked_accessors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function blockedsome10d( x, n, predicate, thisArg ) { // eslint-disable-line max
288288
for ( i0 = 0; i0 < s0; i0++ ) {
289289
if ( predicate.call( thisArg, get( xbuf, ix ), take( [ j9+i9, j8+i8, j7+i7, j6+i6, j5+i5, j4+i4, j3+i3, j2+i2, j1+i1, j0+i0 ], idx ), x.ref ) ) {
290290
count += 1;
291-
if ( count === n ) {
291+
if ( count >= n ) {
292292
return true;
293293
}
294294
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/1d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function some1d( x, n, predicate, thisArg ) {
9898
for ( i0 = 0; i0 < S0; i0++ ) {
9999
if ( predicate.call( thisArg, xbuf[ ix ], [ i0 ], x.ref ) ) {
100100
count += 1;
101-
if ( count === n ) {
101+
if ( count >= n ) {
102102
return true;
103103
}
104104
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/1d_accessors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function some1d( x, n, predicate, thisArg ) {
105105
for ( i0 = 0; i0 < S0; i0++ ) {
106106
if ( predicate.call( thisArg, get( xbuf, ix ), [ i0 ], x.ref ) ) {
107107
count += 1;
108-
if ( count === n ) {
108+
if ( count >= n ) {
109109
return true;
110110
}
111111
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/2d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function some2d( x, n, predicate, thisArg ) {
127127
for ( i0 = 0; i0 < S0; i0++ ) {
128128
if ( predicate.call( thisArg, xbuf[ ix ], take( [ i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
129129
count += 1;
130-
if ( count === n ) {
130+
if ( count >= n ) {
131131
return true;
132132
}
133133
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/2d_accessors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function some2d( x, n, predicate, thisArg ) {
134134
for ( i0 = 0; i0 < S0; i0++ ) {
135135
if ( predicate.call( thisArg, get( xbuf, ix ), take( [ i1, i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
136136
count += 1;
137-
if ( count === n ) {
137+
if ( count >= n ) {
138138
return true;
139139
}
140140
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/2d_blocked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function blockedsome2d( x, n, predicate, thisArg ) {
153153
for ( i0 = 0; i0 < s0; i0++ ) {
154154
if ( predicate.call( thisArg, xbuf[ ix ], take( [ j1+i1, j0+i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
155155
count += 1;
156-
if ( count === n ) {
156+
if ( count >= n ) {
157157
return true;
158158
}
159159
}

lib/node_modules/@stdlib/ndarray/base/some-by/lib/2d_blocked_accessors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function blockedsome2d( x, n, predicate, thisArg ) {
160160
for ( i0 = 0; i0 < s0; i0++ ) {
161161
if ( predicate.call( thisArg, get( xbuf, ix ), take( [ j1+i1, j0+i0 ], idx ), x.ref ) ) { // eslint-disable-line max-len
162162
count += 1;
163-
if ( count === n ) {
163+
if ( count >= n ) {
164164
return true;
165165
}
166166
}

0 commit comments

Comments
 (0)