From bd3fd59e5f0b73099ae70ac8c2db89863ee72165 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Jul 2026 04:21:16 +0000 Subject: [PATCH 1/2] refactor(string/left-pad): normalize error construction to `format` Wraps the empty-pad-string `RangeError` message in `format(...)` to match the file's other four throws and align with the namespace convention (52 of 56 packages in `@stdlib/string` use `format` exclusively; the single plain-string throw here was the only non-conforming call in the file). Message text is unchanged. --- 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 ef7a7761b43bc5033a18ea38fab8e2d4773e8443 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 10 Jul 2026 04:21:20 +0000 Subject: [PATCH 2/2] refactor(string/right-pad): normalize error construction to `format` Wraps the empty-pad-string `RangeError` message in `format(...)` to match the file's other four throws and align with the namespace convention (52 of 56 packages in `@stdlib/string` use `format` exclusively; the single plain-string throw here was the only non-conforming call in the file). Message text is unchanged. --- 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 = ' ';