Skip to content

Commit 2af7b3e

Browse files
committed
Transform error messages
1 parent 3881ce7 commit 2af7b3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var isNumber = require( '@stdlib/assert-is-number' ).isPrimitive;
2727
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2828
var sqrt = require( '@stdlib/math-base-special-sqrt' );
2929
var Float64Array = require( '@stdlib/array-float64' );
30-
var format = require( '@stdlib/string-format' );
30+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
3131

3232

3333
// MAIN //
@@ -296,7 +296,7 @@ function incrmpcorr( W, meanx, meany ) {
296296
var n;
297297
var i;
298298
if ( !isPositiveInteger( W ) ) {
299-
throw new TypeError( format( 'invalid argument. First argument must be a positive integer. Value: `%s`.', W ) );
299+
throw new TypeError( format( '1Ip4b', W ) );
300300
}
301301
buf = new Float64Array( 2*W ); // strided array
302302
n = W - 1;
@@ -307,10 +307,10 @@ function incrmpcorr( W, meanx, meany ) {
307307
N = 0;
308308
if ( arguments.length > 1 ) {
309309
if ( !isNumber( meanx ) ) {
310-
throw new TypeError( format( 'invalid argument. Second argument must be a number. Value: `%s`.', meanx ) );
310+
throw new TypeError( format( '1Ip4A', meanx ) );
311311
}
312312
if ( !isNumber( meany ) ) {
313-
throw new TypeError( format( 'invalid argument. Third argument must be a number. Value: `%s`.', meany ) );
313+
throw new TypeError( format( '1Ip4B', meany ) );
314314
}
315315
mx = meanx;
316316
my = meany;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@stdlib/assert-is-positive-integer": "^0.2.2",
4343
"@stdlib/math-base-assert-is-nan": "^0.2.2",
4444
"@stdlib/math-base-special-sqrt": "^0.2.2",
45-
"@stdlib/string-format": "^0.2.2",
45+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4646
"@stdlib/types": "^0.4.3",
4747
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4848
},

0 commit comments

Comments
 (0)