Skip to content

Commit b0d1382

Browse files
committed
bench: refactor to use string interpolation in docs/migration-guides/lodash
--- 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 6ad74c1 commit b0d1382

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

docs/migration-guides/lodash/benchmark/benchmark.count_by.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
26+
var format = require( '@stdlib/string/format' );
2627
var tryRequire = require( '@stdlib/utils/try-require' );
2728
var countBy = require( '@stdlib/utils/count-by' );
2829
var pkg = require( './../package.json' ).name;
@@ -38,7 +39,7 @@ var opts = {
3839

3940
// MAIN //
4041

41-
bench( pkg+'::stdlib:utils/count-by', opts, function benchmark( b ) {
42+
bench( format( '%s::stdlib:utils/count-by', pkg ), opts, function benchmark( b ) {
4243
var vals;
4344
var arr;
4445
var o;
@@ -72,7 +73,7 @@ bench( pkg+'::stdlib:utils/count-by', opts, function benchmark( b ) {
7273
}
7374
});
7475

75-
bench( pkg+'::lodash:countBy', opts, function benchmark( b ) {
76+
bench( format( '%s::lodash:countBy', pkg ), opts, function benchmark( b ) {
7677
var vals;
7778
var arr;
7879
var o;

docs/migration-guides/lodash/benchmark/benchmark.every.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
26+
var format = require( '@stdlib/string/format' );
2627
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2728
var tryRequire = require( '@stdlib/utils/try-require' );
2829
var every = require( '@stdlib/utils/every' );
@@ -39,7 +40,7 @@ var opts = {
3940

4041
// MAIN //
4142

42-
bench( pkg+'::stdlib:utils/every', opts, function benchmark( b ) {
43+
bench( format( '%s::stdlib:utils/every', pkg ), opts, function benchmark( b ) {
4344
var bool;
4445
var arr;
4546
var i;
@@ -66,7 +67,7 @@ bench( pkg+'::stdlib:utils/every', opts, function benchmark( b ) {
6667
}
6768
});
6869

69-
bench( pkg+'::lodash:every', opts, function benchmark( b ) {
70+
bench( format( '%s::lodash:every', pkg ), opts, function benchmark( b ) {
7071
var bool;
7172
var arr;
7273
var i;

docs/migration-guides/lodash/benchmark/benchmark.for_each.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
26+
var format = require( '@stdlib/string/format' );
2627
var tryRequire = require( '@stdlib/utils/try-require' );
2728
var forEach = require( '@stdlib/utils/for-each' );
2829
var pkg = require( './../package.json' ).name;
@@ -38,7 +39,7 @@ var opts = {
3839

3940
// MAIN //
4041

41-
bench( pkg+'::stdlib:utils/for-each', opts, function benchmark( b ) {
42+
bench( format( '%s::stdlib:utils/for-each', pkg ), opts, function benchmark( b ) {
4243
var arr;
4344
var i;
4445

@@ -66,7 +67,7 @@ bench( pkg+'::stdlib:utils/for-each', opts, function benchmark( b ) {
6667
}
6768
});
6869

69-
bench( pkg+'::lodash:forEach', opts, function benchmark( b ) {
70+
bench( format( '%s::lodash:forEach', pkg ), opts, function benchmark( b ) {
7071
var arr;
7172
var i;
7273

docs/migration-guides/lodash/benchmark/benchmark.for_each_right.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
26+
var format = require( '@stdlib/string/format' );
2627
var tryRequire = require( '@stdlib/utils/try-require' );
2728
var forEachRight = require( '@stdlib/utils/for-each-right' );
2829
var pkg = require( './../package.json' ).name;
@@ -38,7 +39,7 @@ var opts = {
3839

3940
// MAIN //
4041

41-
bench( pkg+'::stdlib:utils/for-each-right', opts, function benchmark( b ) {
42+
bench( format( '%s::stdlib:utils/for-each-right', pkg ), opts, function benchmark( b ) {
4243
var arr;
4344
var i;
4445

@@ -66,7 +67,7 @@ bench( pkg+'::stdlib:utils/for-each-right', opts, function benchmark( b ) {
6667
}
6768
});
6869

69-
bench( pkg+'::lodash:forEachRight', opts, function benchmark( b ) {
70+
bench( format( '%s::lodash:forEachRight', pkg ), opts, function benchmark( b ) {
7071
var arr;
7172
var i;
7273

docs/migration-guides/lodash/benchmark/benchmark.group_by.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
26+
var format = require( '@stdlib/string/format' );
2627
var tryRequire = require( '@stdlib/utils/try-require' );
2728
var groupBy = require( '@stdlib/utils/group-by' );
2829
var pkg = require( './../package.json' ).name;
@@ -38,7 +39,7 @@ var opts = {
3839

3940
// MAIN //
4041

41-
bench( pkg+'::stdlib:utils/group-by', opts, function benchmark( b ) {
42+
bench( format( '%s::stdlib:utils/group-by', pkg ), opts, function benchmark( b ) {
4243
var vals;
4344
var arr;
4445
var o;
@@ -72,7 +73,7 @@ bench( pkg+'::stdlib:utils/group-by', opts, function benchmark( b ) {
7273
}
7374
});
7475

75-
bench( pkg+'::lodash:groupBy', opts, function benchmark( b ) {
76+
bench( format( '%s::lodash:groupBy', pkg ), opts, function benchmark( b ) {
7677
var vals;
7778
var arr;
7879
var o;

docs/migration-guides/lodash/benchmark/benchmark.key_by.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var tryRequire = require( '@stdlib/utils/try-require' );
26+
var format = require( '@stdlib/string/format' );
2627
var keyBy = require( '@stdlib/utils/key-by' );
2728
var pkg = require( './../package.json' ).name;
2829

@@ -37,7 +38,7 @@ var opts = {
3738

3839
// MAIN //
3940

40-
bench( pkg+'::stdlib:utils/key-by', opts, function benchmark( b ) {
41+
bench( format( '%s::stdlib:utils/key-by', pkg ), opts, function benchmark( b ) {
4142
var arr;
4243
var out;
4344
var i;
@@ -69,7 +70,7 @@ bench( pkg+'::stdlib:utils/key-by', opts, function benchmark( b ) {
6970
}
7071
});
7172

72-
bench( pkg+'::lodash:keyBy', opts, function benchmark( b ) {
73+
bench( format( '%s::lodash:keyBy', pkg ), opts, function benchmark( b ) {
7374
var arr;
7475
var out;
7576
var i;

0 commit comments

Comments
 (0)