diff --git a/lib/main.js b/lib/main.js index f2bce6a..9d151a9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -21,7 +21,7 @@ // MODULES // var isCollection = require( '@stdlib/assert-is-collection' ); -var format = require( '@stdlib/string-format' ); +var format = require( '@stdlib/error-tools-fmtprodmsg' ); // MAIN // @@ -48,14 +48,14 @@ function data( x ) { // Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function... if ( typeof x !== 'object' || x === null ) { - throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) ); + throw new TypeError( format( '1kTDv', x ) ); } out = x.data; if ( isCollection( out ) ) { return out; } // A data buffer is essential for operating on an ndarray object, so no fallbacks or workarounds for data buffer resolution... - throw new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) ); + throw new TypeError( format( '1kTDv', x ) ); } diff --git a/package.json b/package.json index e8c59da..22fd7c8 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@stdlib/assert-is-collection": "^0.2.3", - "@stdlib/string-format": "^0.2.3", + "@stdlib/error-tools-fmtprodmsg": "^0.2.3", "@stdlib/types": "^0.5.1", "@stdlib/error-tools-fmtprodmsg": "^0.2.3" },