10000 Transform error messages · stdlib-js/utils-push@4871cb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4871cb0

Browse files
committed
Transform error messages
1 parent 45d70d4 commit 4871cb0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var isArray = require( '@stdlib/assert-is-array' );
2424
var isTypedArrayLike = require( '@stdlib/assert-is-typed-array-like' );
2525
var isInteger = require( '@stdlib/assert-is-integer' );
26-
var format = require( '@stdlib/string-format' );
26+
var format = require( '@stdlib/error-tools-fmtprodmsg' );
2727
var pushArray = require( './push_array.js' );
2828
var pushObject = require( './push_object.js' );
2929
var pushTypedArray = require( './push_typed_array.js' );
@@ -78,7 +78,7 @@ function push( collection ) {
7878
) {
7979
return pushObject( collection, items );
8080
}
81-
throw new TypeError( format( 'invalid argument. First argument must be either an array, typed array, or an array-like object. Value: `%s`.', collection ) );
81+
throw new TypeError( format( '1X9Ai', collection ) );
8282
}
8383

8484

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@stdlib/assert-is-integer": "^0.2.2",
4343
"@stdlib/assert-is-typed-array-like": "^0.2.2",
4444
"@stdlib/math-base-special-ceil2": "^0.3.0",
45-
"@stdlib/string-format": "^0.2.2",
45+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2",
4646
"@stdlib/types": "^0.4.1",
4747
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4848
},

0 commit comments

Comments
 (0)
0