Skip to content

Commit 78351b3

Browse files
chore: fix JavaScript lint errors
PR-URL: #8176 Closes: #8169 Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
1 parent 76a39f5 commit 78351b3

File tree

2 files changed

+23
-22
lines changed
  • lib/node_modules/@stdlib

2 files changed

+23
-22
lines changed

lib/node_modules/@stdlib/assert/is-nonpositive-number/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* eslint-disable no-new-wrappers, no-undefined, no-empty-function */
19+
/* eslint-disable no-undefined, no-empty-function */
2020

2121
'use strict';
2222

lib/node_modules/@stdlib/utils/async/reduce-right/lib/limit.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ function limit( collection, acc, opts, fcn, done ) {
7474
next(); // eslint-disable-line node/callback-return
7575
}
7676
}
77+
/**
78+
* Callback invoked once a provided function finishes processing a collection element.
79+
*
80+
* @private
81+
* @param {*} [error] - error
82+
* @param {*} [result] - accumulation result
83+
* @returns {void}
84+
*/
85+
function cb( error, result ) {
86+
if ( flg ) {
87+
// Prevent further processing of collection elements:
88+
return;
89+
}
90+
if ( error ) {
91+
flg = true;
92+
return clbk( error );
93+
}
94+
debug( 'Accumulator: %s', JSON.stringify( result ) );
95+
acc = result;
96+
clbk();
97+
}
98+
7799
/**
78100
* Callback to invoke a provided function for the next element in a collection.
79101
*
@@ -89,27 +111,6 @@ function limit( collection, acc, opts, fcn, done ) {
89111
} else {
90112
fcn.call( opts.thisArg, acc, collection[ idx ], idx, collection, cb ); // eslint-disable-line max-len
91113
}
92-
/**
93-
* Callback invoked once a provided function finishes processing a collection element.
94-
*
95-
* @private
96-
* @param {*} [error] - error
97-
* @param {*} [result] - accumulation result
98-
* @returns {void}
99-
*/
100-
function cb( error, result ) {
101-
if ( flg ) {
102-
// Prevent further processing of collection elements:
103-
return;
104-
}
105-
if ( error ) {
106-
flg = true;
107-
return clbk( error );
108-
}
109-
debug( 'Accumulator: %s', JSON.stringify( result ) );
110-
acc = result;
111-
clbk();
112-
}
113114
}
114115

115116
/**

0 commit comments

Comments
 (0)