File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ var array2json = require( '@stdlib/array-to-json' );
33
33
var dtype = require ( '@stdlib/array-dtype' ) ;
34
34
var copy = require ( '@stdlib/array-base-copy' ) ;
35
35
var resolveGetter = require ( '@stdlib/array-base-resolve-getter' ) ;
36
- var format = require ( '@stdlib/string-format ' ) ;
36
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
37
37
var defaults = require ( './defaults.js' ) ;
38
38
var validate = require ( './validate.js' ) ;
39
39
var cache = require ( './cache.js' ) ;
@@ -77,7 +77,7 @@ function ArrayIndex( x ) {
77
77
return new ArrayIndex ( x ) ;
78
78
}
79
79
if ( ! isCollection ( x ) ) {
80
- throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object. Value: `%s`. ' , x ) ) ;
80
+ throw new TypeError ( format ( 'null2O ' , x ) ) ;
81
81
}
82
82
dt = dtype ( x ) ;
83
83
Original file line number Diff line number Diff line change 23
23
var isObject = require ( '@stdlib/assert-is-plain-object' ) ;
24
24
var hasOwnProp = require ( '@stdlib/assert-has-own-property' ) ;
25
25
var isBoolean = require ( '@stdlib/assert-is-boolean' ) . isPrimitive ;
26
- var format = require ( '@stdlib/string-format ' ) ;
26
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
27
27
28
28
29
29
// MAIN //
@@ -49,12 +49,12 @@ var format = require( '@stdlib/string-format' );
49
49
*/
50
50
function validate ( opts , options ) {
51
51
if ( ! isObject ( options ) ) {
52
- return new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
52
+ return new TypeError ( format ( 'null2V ' , options ) ) ;
53
53
}
54
54
if ( hasOwnProp ( options , 'persist' ) ) {
55
55
opts . persist = options . persist ;
56
56
if ( ! isBoolean ( opts . persist ) ) {
57
- return new TypeError ( format ( 'invalid option. `%s` option must be a boolean. Option: `%s`. ' , 'persist' , opts . persist ) ) ;
57
+ return new TypeError ( format ( 'null2o ' , 'persist' , opts . persist ) ) ;
58
58
}
59
59
}
60
60
return null ;
Original file line number Diff line number Diff line change 47
47
"@stdlib/assert-is-collection" : " ^0.2.2" ,
48
48
"@stdlib/assert-is-integer" : " ^0.2.2" ,
49
49
"@stdlib/assert-is-plain-object" : " ^0.2.2" ,
50
- "@stdlib/string-format " : " ^0.2.2" ,
50
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.2" ,
51
51
"@stdlib/types" : " ^0.4.3" ,
52
52
"@stdlib/utils-define-nonenumerable-property" : " ^0.2.2" ,
53
53
"@stdlib/utils-define-nonenumerable-read-only-accessor" : " ^0.2.3" ,
You can’t perform that action at this time.
0 commit comments