From 93271fb2fe7ec7930d0c4f90f5afb2e94ffc3349 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 12:10:06 +0000 Subject: [PATCH 1/2] refactor: normalize error construction in `string/left-pad` Wrap the empty-pad-string `RangeError` message in `format()` so the throw matches the four other `format()`-wrapped throws in the same file. Conforms to the namespace-wide `format()` convention used by 55 of 56 leaf packages in `@stdlib/string`. --- lib/node_modules/@stdlib/string/left-pad/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/string/left-pad/lib/main.js b/lib/node_modules/@stdlib/string/left-pad/lib/main.js index 8af50523e7dc..54edbf659e50 100644 --- a/lib/node_modules/@stdlib/string/left-pad/lib/main.js +++ b/lib/node_modules/@stdlib/string/left-pad/lib/main.js @@ -67,7 +67,7 @@ function lpad( str, len, pad ) { throw new TypeError( format( 'invalid argument. Third argument must be a string. Value: `%s`.', p ) ); } if ( p.length === 0 ) { - throw new RangeError( 'invalid argument. Third argument must not be an empty string.' ); + throw new RangeError( format( 'invalid argument. Third argument must not be an empty string.' ) ); } } else { p = ' '; From 417fb952982bea9ccf23da973e787988027951e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 12:10:10 +0000 Subject: [PATCH 2/2] refactor: normalize error construction in `string/right-pad` Wrap the empty-pad-string `RangeError` message in `format()` so the throw matches the four other `format()`-wrapped throws in the same file. Conforms to the namespace-wide `format()` convention used by 55 of 56 leaf packages in `@stdlib/string`. --- lib/node_modules/@stdlib/string/right-pad/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/string/right-pad/lib/main.js b/lib/node_modules/@stdlib/string/right-pad/lib/main.js index 05f5062cfa0a..2ebd9c83b372 100644 --- a/lib/node_modules/@stdlib/string/right-pad/lib/main.js +++ b/lib/node_modules/@stdlib/string/right-pad/lib/main.js @@ -67,7 +67,7 @@ function rpad( str, len, pad ) { throw new TypeError( format( 'invalid argument. Third argument must be a string. Value: `%s`.', p ) ); } if ( p.length === 0 ) { - throw new RangeError( 'invalid argument. Pad string must not be an empty string.' ); + throw new RangeError( format( 'invalid argument. Pad string must not be an empty string.' ) ); } } else { p = ' ';