File tree 2 files changed +4
-4
lines changed 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 23
23
var isCollection = require ( '@stdlib/assert-is-collection' ) ;
24
24
var isNonNegativeInteger = require ( '@stdlib/assert-is-nonnegative-integer' ) . isPrimitive ;
25
25
var base = require ( '@stdlib/array-base-cartesian-power' ) ;
26
- var format = require ( '@stdlib/string-format ' ) ;
26
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
27
27
28
28
29
29
// MAIN //
@@ -45,10 +45,10 @@ var format = require( '@stdlib/string-format' );
45
45
*/
46
46
function cartesianPower ( x , n ) {
47
47
if ( ! isCollection ( x ) ) {
48
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object. Value: `%s`. ' , x ) ) ;
48
+ throw new TypeError ( format ( '1p52O ' , x ) ) ;
49
49
}
50
50
if ( ! isNonNegativeInteger ( n ) ) {
51
- throw new TypeError ( format ( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`. ' , n ) ) ;
51
+ throw new TypeError ( format ( '1p53X ' , n ) ) ;
52
52
}
53
53
return base ( x , n ) ;
54
54
}
Original file line number Diff line number Diff line change 40
40
"@stdlib/array-base-cartesian-power" : " ^0.2.1" ,
41
41
"@stdlib/assert-is-collection" : " ^0.2.2" ,
42
42
"@stdlib/assert-is-nonnegative-integer" : " ^0.2.2" ,
43
- "@stdlib/string-format " : " ^0.2.2" ,
43
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.2" ,
44
44
"@stdlib/types" : " ^0.3.2" ,
45
45
"@stdlib/error-tools-fmtprodmsg" : " ^0.2.2"
46
46
},
You can’t perform that action at this time.
0 commit comments