diff --git a/lib/main.js b/lib/main.js index 5e608c3..7db9382 100644 --- a/lib/main.js +++ b/lib/main.js @@ -21,7 +21,7 @@ // MODULES // var defineProperty = require( '@stdlib/utils-define-property' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); var validate = require( './validate.js' ); var createObject = require( './detect.js' ); @@ -71,7 +71,7 @@ function inherit( ctor, superCtor ) { throw err; } if ( typeof superCtor.prototype === 'undefined' ) { - throw new TypeError( format( 'invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.', superCtor.prototype ) ); + throw new TypeError( format( '1UTBD', superCtor.prototype ) ); } // Create a prototype which inherits from the parent prototype: ctor.prototype = createObject( superCtor.prototype ); diff --git a/lib/validate.js b/lib/validate.js index 44e285b..ba2e2f7 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -20,7 +20,7 @@ // MODULES // -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -47,7 +47,7 @@ function validate( value ) { value === null || (type !== 'object' && type !== 'function') ) { - return new TypeError( format( 'invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.', value ) ); + return new TypeError( format( '1UTBE', value ) ); } return null; } diff --git a/package.json b/package.json index fc8b0e0..cc9ca32 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "https://github.com/stdlib-js/stdlib/issues" }, "dependencies": { - "@stdlib/string-format": "^0.2.2", + "@stdlib/error-tools-fmtprodmsg": "^0.2.2", "@stdlib/utils-define-property": "^0.2.4", "@stdlib/error-tools-fmtprodmsg": "^0.2.2" },