Skip to content

Commit 4c9d360

Browse files
committed
fix: javascript lint errors and warnings
--- 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: passed - 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 6114701 commit 4c9d360

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.factory.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2026 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -22,13 +22,14 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var EPS = require( '@stdlib/constants/float64/eps' );
25+
var format = require( '@stdlib/string/format' );
2526
var pkg = require( './../package.json' ).name;
2627
var factory = require( './../lib/factory.js' );
2728

2829

2930
// MAIN //
3031

31-
bench( pkg+':factory', function benchmark( b ) {
32+
bench( format( '%s:factory', pkg ), function benchmark( b ) {
3233
var inmapAsync;
3334
var arr;
3435
var len;
@@ -40,10 +41,10 @@ bench( pkg+':factory', function benchmark( b ) {
4041
clbk( null, v*i );
4142
}
4243
}
43-
arr = new Array( 100 );
44-
len = arr.length;
44+
arr = [];
45+
len = 100;
4546
for ( i = 0; i < len; i++ ) {
46-
arr[ i ] = EPS;
47+
arr.push( EPS );
4748
}
4849
inmapAsync = factory( onItem );
4950

lib/node_modules/@stdlib/utils/async/inmap/benchmark/benchmark.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2026 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var EPS = require( '@stdlib/constants/float64/eps' );
25+
var format = require( '@stdlib/string/format' );
2526
var pkg = require( './../package.json' ).name;
2627
var inmapAsync = require( './../lib' );
2728

@@ -39,10 +40,10 @@ bench( pkg, function benchmark( b ) {
3940
clbk( null, v*i );
4041
}
4142
}
42-
arr = new Array( 100 );
43-
len = arr.length;
43+
arr = [];
44+
len = 100;
4445
for ( i = 0; i < len; i++ ) {
45-
arr[ i ] = EPS;
46+
arr.push( EPS );
4647
}
4748
i = 0;
4849
b.tic();
@@ -64,7 +65,7 @@ bench( pkg, function benchmark( b ) {
6465
}
6566
});
6667

67-
bench( pkg+':series=true', function benchmark( b ) {
68+
bench( format( '%s:series=true', pkg ), function benchmark( b ) {
6869
var opts;
6970
var arr;
7071
var len;
@@ -79,10 +80,10 @@ bench( pkg+':series=true', function benchmark( b ) {
7980
opts = {
8081
'series': true
8182
};
82-
arr = new Array( 100 );
83-
len = arr.length;
83+
arr = [];
84+
len = 100;
8485
for ( i = 0; i < len; i++ ) {
85-
arr[ i ] = EPS;
86+
arr.push( EPS );
8687
}
8788
i = 0;
8889
b.tic();
@@ -104,7 +105,7 @@ bench( pkg+':series=true', function benchmark( b ) {
104105
}
105106
});
106107

107-
bench( pkg+':limit=3', function benchmark( b ) {
108+
bench( format( '%s:limit=3', pkg ), function benchmark( b ) {
108109
var opts;
109110
var arr;
110111
var len;
@@ -119,10 +120,10 @@ bench( pkg+':limit=3', function benchmark( b ) {
119120
opts = {
120121
'limit': 3
121122
};
122-
arr = new Array( 100 );
123-
len = arr.length;
123+
arr = [];
124+
len = 100;
124125
for ( i = 0; i < len; i++ ) {
125-
arr[ i ] = EPS;
126+
arr.push( EPS );
126127
}
127128
i = 0;
128129
b.tic();

0 commit comments

Comments
 (0)