diff --git a/lib/main.js b/lib/main.js index f5f193c..12c5cf3 100644 --- a/lib/main.js +++ b/lib/main.js @@ -24,7 +24,7 @@ var isObject = require( '@stdlib/assert-is-object' ); var isPositiveInteger = require( '@stdlib/assert-is-positive-integer' ).isPrimitive; var hasOwnProp = require( '@stdlib/assert-has-own-property' ); 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 someOwnBy( obj, n, predicate, thisArg ) { var out; var key; if ( !isObject( obj ) ) { - throw new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) ); + throw new TypeError( format( 'null3L', obj ) ); } if ( !isPositiveInteger( n ) ) { - throw new TypeError( format( 'invalid argument. Second argument must be a positive integer. Value: `%s`.', n ) ); + throw new TypeError( format( 'null45', n ) ); } if ( !isFunction( predicate ) ) { - throw new TypeError( format( 'invalid argument. Third argument must be a function. Value: `%s`.', predicate ) ); + throw new TypeError( format( 'null3N', predicate ) ); } count = 0; for ( key in obj ) { diff --git a/package.json b/package.json index 731f631..b13cd68 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@stdlib/assert-is-function": "^0.2.2", "@stdlib/assert-is-object": "^0.2.2", "@stdlib/assert-is-positive-integer": "^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" },