diff --git a/lib/main.js b/lib/main.js index b0d8fb6..a11d34e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -22,7 +22,7 @@ var isCollection = require( '@stdlib/assert-is-collection' ); var isFunction = require( '@stdlib/assert-is-function' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -56,13 +56,13 @@ function whileEach( collection, predicate, fcn, thisArg ) { var len; var i; if ( !isCollection( collection ) ) { - throw new TypeError( format( 'invalid argument. First argument must be a collection. Value: `%s`.', collection ) ); + throw new TypeError( format( '1YRAh', collection ) ); } if ( !isFunction( predicate ) ) { - throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', predicate ) ); + throw new TypeError( format( '1YR2H', predicate ) ); } if ( !isFunction( fcn ) ) { - throw new TypeError( format( 'invalid argument. Third argument must be a function. Value: `%s`.', fcn ) ); + throw new TypeError( format( '1YR3N', fcn ) ); } len = collection.length; i = 0; diff --git a/package.json b/package.json index 2bdbe61..4e70e78 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dependencies": { "@stdlib/assert-is-collection": "^0.2.2", "@stdlib/assert-is-function": "^0.2.2", - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/types": "^0.4.3", "@stdlib/error-tools-fmtprodmsg": "^0.2.2" },