@@ -24,6 +24,7 @@ var isArray = require( '@stdlib/assert-is-array' );
24
24
var isCollection = require ( '@stdlib/assert-is-collection' ) ;
25
25
var isTypedArrayLike = require ( '@stdlib/assert-is-typed-array-like' ) ;
26
26
var isInteger = require ( '@stdlib/assert-is-integer' ) ;
27
+ var format = require ( '@stdlib/string-format' ) ;
27
28
var appendArray = require ( './append_array.js' ) ;
28
29
var appendObject = require ( './append_object.js' ) ;
29
30
var appendTypedArray = require ( './append_typed_array.js' ) ;
@@ -55,7 +56,7 @@ var appendTypedArray = require( './append_typed_array.js' );
55
56
*/
56
57
function append ( collection1 , collection2 ) {
57
58
if ( ! isCollection ( collection2 ) ) {
58
- throw new TypeError ( 'invalid argument. Second argument must be an array-like object. Value: `' + collection2 + ' `.' ) ;
59
+ throw new TypeError ( format ( 'invalid argument. Second argument must be an array-like object. Value: `%s `.' , collection2 ) ) ;
59
60
}
60
61
if ( isArray ( collection1 ) ) {
61
62
return appendArray ( collection1 , collection2 ) ;
@@ -74,7 +75,7 @@ function append( collection1, collection2 ) {
74
75
) {
75
76
return appendObject ( collection1 , collection2 ) ;
76
77
}
77
- throw new TypeError ( 'invalid argument. First argument must be either an Array, Typed Array, or an array-like Object . Value: `' + collection1 + ' `.' ) ;
78
+ throw new TypeError ( format ( 'invalid argument. First argument must be either an Array, Typed Array, or an array-like object . Value: `%s `.' , collection1 ) ) ;
78
79
}
79
80
80
81
0 commit comments