Skip to content

Commit fd79470

Browse files
committed
Auto-generated commit
1 parent 8c72ee0 commit fd79470

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/append.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var isArray = require( '@stdlib/assert-is-array' );
2424
var isCollection = require( '@stdlib/assert-is-collection' );
2525
var isTypedArrayLike = require( '@stdlib/assert-is-typed-array-like' );
2626
var isInteger = require( '@stdlib/assert-is-integer' );
27+
var format = require( '@stdlib/string-format' );
2728
var appendArray = require( './append_array.js' );
2829
var appendObject = require( './append_object.js' );
2930
var appendTypedArray = require( './append_typed_array.js' );
@@ -55,7 +56,7 @@ var appendTypedArray = require( './append_typed_array.js' );
5556
*/
5657
function append( collection1, collection2 ) {
5758
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 ) );
5960
}
6061
if ( isArray( collection1 ) ) {
6162
return appendArray( collection1, collection2 );
@@ -74,7 +75,7 @@ function append( collection1, collection2 ) {
7475
) {
7576
return appendObject( collection1, collection2 );
7677
}
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 ) );
7879
}
7980

8081

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@stdlib/assert-is-integer": "^0.0.x",
4444
"@stdlib/assert-is-typed-array-like": "^0.0.x",
4545
"@stdlib/math-base-special-ceil2": "^0.0.x",
46+
"@stdlib/string-format": "^0.0.x",
4647
"@stdlib/types": "^0.0.x"
4748
},
4849
"devDependencies": {

0 commit comments

Comments
 (0)