From 81961adfbf5169658c1c080528f916691f2dd7e4 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 19 Apr 2026 13:00:55 -0400 Subject: [PATCH] bench: refactor to use string interpolation in `@stdlib/nlp` --- 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 --- --- .../@stdlib/nlp/expand-acronyms/benchmark/benchmark.js | 3 ++- .../@stdlib/nlp/expand-contractions/benchmark/benchmark.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/nlp/expand-acronyms/benchmark/benchmark.js b/lib/node_modules/@stdlib/nlp/expand-acronyms/benchmark/benchmark.js index 02a6bb2e8005..7e3367f53170 100644 --- a/lib/node_modules/@stdlib/nlp/expand-acronyms/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/nlp/expand-acronyms/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var mobyDick = require( '@stdlib/datasets/moby-dick' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var expandAcronyms = require( './../lib' ); var ACRONYMS = require( './../lib/acronyms.json' ); @@ -51,7 +52,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::long_text', function benchmark( b ) { +bench( format( '%s::long_text', pkg ), function benchmark( b ) { var text; var str; var out; diff --git a/lib/node_modules/@stdlib/nlp/expand-contractions/benchmark/benchmark.js b/lib/node_modules/@stdlib/nlp/expand-contractions/benchmark/benchmark.js index a880d0b10d38..c880be915593 100644 --- a/lib/node_modules/@stdlib/nlp/expand-contractions/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/nlp/expand-contractions/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var mobyDick = require( '@stdlib/datasets/moby-dick' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var expandContractions = require( './../lib' ); var CONTRACTIONS = require( './../lib/contractions.json' ); @@ -51,7 +52,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::long_text', function benchmark( b ) { +bench( format( '%s::long_text', pkg ), function benchmark( b ) { var text; var str; var out;