@@ -31,7 +31,7 @@ var noop = require( '@stdlib/utils-noop' );
3131var randu = require ( '@stdlib/random-base-mt19937' ) . factory ;
3232var isnan = require ( '@stdlib/math-base-assert-is-nan' ) ;
3333var typedarray2json = require ( '@stdlib/array-to-json' ) ;
34- var format = require ( '@stdlib/string-format ' ) ;
34+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
3535var validate = require ( './validate.js' ) ;
3636var weibull0 = require ( './weibull.js' ) ;
3737
@@ -81,11 +81,11 @@ function factory() {
8181} else if ( arguments . length === 1 ) {
8282opts = arguments [ 0 ] ;
8383if ( ! isObject ( opts ) ) {
84- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , opts ) ) ;
84+ throw new TypeError ( format ( '0pD2V ' , opts ) ) ;
8585}
8686if ( hasOwnProp ( opts , 'prng' ) ) {
8787if ( ! isFunction ( opts . prng ) ) {
88- throw new TypeError ( format ( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`. ' , 'prng' , opts . prng ) ) ;
88+ throw new TypeError ( format ( '0pD6u ' , 'prng' , opts . prng ) ) ;
8989}
9090rand = opts . prng ;
9191} else {
@@ -101,11 +101,11 @@ function factory() {
101101if ( arguments . length > 2 ) {
102102opts = arguments [ 2 ] ;
103103if ( ! isObject ( opts ) ) {
104- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , opts ) ) ;
104+ throw new TypeError ( format ( '0pD2V ' , opts ) ) ;
105105}
106106if ( hasOwnProp ( opts , 'prng' ) ) {
107107if ( ! isFunction ( opts . prng ) ) {
108- throw new TypeError ( format ( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`. ' , 'prng' , opts . prng ) ) ;
108+ throw new TypeError ( format ( '0pD6u ' , 'prng' , opts . prng ) ) ;
109109}
110110rand = opts . prng ;
111111} else {
0 commit comments