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 21
21
// MODULES //
22
22
23
23
var isObject = require ( '@stdlib/assert-is-plain-object' ) ;
24
- var format = require ( '@stdlib/string-format ' ) ;
24
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
25
25
var assign = require ( '@stdlib/object-assign' ) ;
26
26
var EmptyStream = require ( './main.js' ) ;
27
27
@@ -54,7 +54,7 @@ function factory( options ) {
54
54
var opts ;
55
55
if ( arguments . length > 0 ) {
56
56
if ( ! isObject ( options ) ) {
57
- throw new TypeError ( format ( 'invalid argument. Options argument must be an object. Value: `%s`. ' , options ) ) ;
57
+ throw new TypeError ( format ( '1M72V ' , options ) ) ;
58
58
}
59
59
opts = assign ( { } , options ) ;
60
60
} else {
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 ( '1M72V ' , options ) ) ;
53
53
}
54
54
if ( hasOwnProp ( options , 'objectMode' ) ) {
55
55
opts . objectMode = options . objectMode ;
56
56
if ( ! isBoolean ( opts . objectMode ) ) {
57
- return new TypeError ( format ( 'invalid option. `%s` option must be a boolean. Option: `%s`. ' , 'objectMode' , opts . objectMode ) ) ;
57
+ return new TypeError ( format ( '1M72o ' , 'objectMode' , opts . objectMode ) ) ;
58
58
}
59
59
}
60
60
return null ;
Original file line number Diff line number Diff line change 48
48
"@stdlib/fs-read-file" : " ^0.2.2" ,
49
49
"@stdlib/object-assign" : " ^0.2.2" ,
50
50
"@stdlib/streams-node-stdout" : " ^0.2.2" ,
51
- "@stdlib/string-format " : " ^0.2.2" ,
51
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.2" ,
52
52
"@stdlib/types" : " ^0.3.2" ,
53
53
"@stdlib/utils-define-nonenumerable-property" : " ^0.2.2" ,
54
54
"@stdlib/utils-define-nonenumerable-read-only-property" : " ^0.2.2" ,
You can’t perform that action at this time.
0 commit comments