File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ var Readable = require( 'readable-stream' ).Readable;
24
24
var isCollection = require ( '@stdlib/assert-is-collection' ) ;
25
25
var isError = require ( '@stdlib/assert-is-error' ) ;
26
26
var isBuffer = require ( '@stdlib/assert-is-buffer' ) ;
27
+ var format = require ( '@stdlib/string-format' ) ;
27
28
var copy = require ( '@stdlib/utils-copy' ) ;
28
29
var inherit = require ( '@stdlib/utils-inherit' ) ;
29
30
var setNonEnumerable = require ( '@stdlib/utils-define-nonenumerable-property' ) ;
@@ -180,7 +181,7 @@ function ArrayStream( src, options ) {
180
181
return new ArrayStream ( src ) ;
181
182
}
182
183
if ( ! isCollection ( src ) ) {
183
- throw new TypeError ( 'invalid argument. First argument must be an array-like object. Value: `' + src + '`.' ) ;
184
+ throw new TypeError ( format ( 'invalid argument. First argument must be an array-like object. Value: `%s`.' , src ) ) ;
184
185
}
185
186
opts = copy ( DEFAULTS ) ;
186
187
if ( arguments . length > 1 ) {
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
25
var copy = require ( '@stdlib/utils-copy' ) ;
25
26
var ArrayStream = require ( './main.js' ) ;
26
27
@@ -64,7 +65,7 @@ function objectMode( src, options ) {
64
65
if ( arguments . length > 1 ) {
65
66
opts = options ;
66
67
if ( ! isObject ( opts ) ) {
67
- throw new TypeError ( 'invalid argument. Options must be an object. Value: `' + opts + '`.' ) ;
68
+ throw new TypeError ( format ( 'invalid argument. Options must be an object. Value: `%s`.' , opts ) ) ;
68
69
}
69
70
opts = copy ( options , 1 ) ;
70
71
} else {
You can’t perform that action at this time.
0 commit comments