Skip to content

Commit 3c9c884

Browse files
committed
Transform error messages
1 parent c61b4fe commit 3c9c884

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var slice = require( '@stdlib/array-base-slice' );
2424
var resolveSetter = require( '@stdlib/array-base-resolve-setter' );
25-
var format = require( '@stdlib/string-format' );
25+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2626

2727

2828
// FUNCTIONS //
@@ -80,10 +80,10 @@ function arrayWith( x, index, value ) {
8080
if ( index < 0 ) {
8181
index += x.length;
8282
if ( index < 0 ) {
83-
throw new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', index ) );
83+
throw new RangeError( format( 'null2M', index ) );
8484
}
8585
} else if ( index >= x.length ) {
86-
throw new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', index ) );
86+
throw new RangeError( format( 'null2M', index ) );
8787
}
8888
out = slice( x, 0, x.length );
8989
set = resolveSetter( out );

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dependencies": {
4040
"@stdlib/array-base-resolve-setter": "^0.2.1",
4141
"@stdlib/array-base-slice": "^0.2.1",
42-
"@stdlib/string-format": "^0.2.1",
42+
"@stdlib/error-tools-fmtprodmsg": "^0.2.1",
4343
"@stdlib/types": "^0.3.2",
4444
"@stdlib/error-tools-fmtprodmsg": "^0.2.1"
4545
},

0 commit comments

Comments
 (0)