Skip to content

Commit 7803ba1

Browse files
committed
Drop primitive from error messages
1 parent 81b9f42 commit 7803ba1

File tree

305 files changed

+588
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+588
-588
lines changed

lib/node_modules/@stdlib/_tools/benchmarks/browser-build/lib/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ function build( root, output, options, clbk ) {
9393
var d;
9494

9595
if ( !isString( root ) ) {
96-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', root ) );
96+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', root ) );
9797
}
9898
if ( !isString( output ) ) {
99-
throw new TypeError( format( 'invalid argument. Second argument must be a string primitive. Value: `%s`.', output ) );
99+
throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', output ) );
100100
}
101101
opts = copy( defaults );
102102
if ( arguments.length < 4 ) {

lib/node_modules/@stdlib/_tools/benchmarks/bundle/lib/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function build( root, options, clbk ) {
7979
var d;
8080

8181
if ( !isString( root ) ) {
82-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', root ) );
82+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', root ) );
8383
}
8484
opts = copy( defaults );
8585
if ( arguments.length < 3 ) {

lib/node_modules/@stdlib/_tools/benchmarks/html/lib/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function build( bundle, options, clbk ) {
8383
var cb;
8484

8585
if ( !isString( bundle ) ) {
86-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', bundle ) );
86+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', bundle ) );
8787
}
8888
opts = copy( defaults );
8989
if ( arguments.length < 3 ) {

lib/node_modules/@stdlib/_tools/bib/citation-reference/lib/async.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function toReference( id, options, clbk ) {
7777
var cb;
7878

7979
if ( !isString( id ) ) {
80-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', id ) );
80+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', id ) );
8181
}
8282
opts = copy( defaults );
8383
if ( arguments.length < 3 ) {

lib/node_modules/@stdlib/_tools/bib/citation-reference/lib/sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function toReference( id, options ) {
7171
var err;
7272

7373
if ( !isString( id ) ) {
74-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', id ) );
74+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', id ) );
7575
}
7676
opts = copy( defaults );
7777
if ( arguments.length > 1 ) {

lib/node_modules/@stdlib/_tools/bib/citation-reference/lib/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ function validate( opts, options ) {
5757
if ( hasOwnProp( options, 'database' ) ) {
5858
opts.database = options.database;
5959
if ( !isString( opts.database ) ) {
60-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'database', opts.database ) );
60+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'database', opts.database ) );
6161
}
6262
}
6363
if ( hasOwnProp( options, 'csl' ) ) {
6464
opts.csl = options.csl;
6565
if ( !isString( opts.csl ) ) {
66-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'csl', opts.csl ) );
66+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'csl', opts.csl ) );
6767
}
6868
}
6969
return null;

lib/node_modules/@stdlib/_tools/browserify/file-list/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var debug = logger( 'browserify:file-list' );
4343
* @param {string} [dest] - output file path
4444
* @param {Callback} clbk - callback to invoke after creating a bundle
4545
* @throws {TypeError} first argument must be an array of string primitives
46-
* @throws {TypeError} the output file path must be a string primitive
46+
* @throws {TypeError} the output file path must be a string
4747
* @throws {TypeError} last argument must be a function
4848
*
4949
* @example
@@ -71,7 +71,7 @@ function bundle( files, dest, clbk ) {
7171
cb = dest;
7272
} else {
7373
if ( !isString( dest ) ) {
74-
throw new TypeError( format( 'invalid argument. Second argument must be a string primitive. Value: `%s`.', dest ) );
74+
throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', dest ) );
7575
}
7676
out = dest;
7777
cb = clbk;

lib/node_modules/@stdlib/_tools/browserify/string/lib/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ var TMPFILE = join( tmpdir(), '.__browserify-string-tmp-file_' );
5858
* @param {Array} [options.plugins] - plugins to apply when bundling
5959
* @param {StringArray} [options.external] - module(s) to omit from a generated bundle which can be assumed to be present in a separate external bundle
6060
* @param {Callback} clbk - callback to invoke after creating a bundle
61-
* @throws {TypeError} first argument must be a string primitive
62-
* @throws {TypeError} the output file path must be a string primitive
61+
* @throws {TypeError} first argument must be a string
62+
* @throws {TypeError} the output file path must be a string
6363
* @throws {TypeError} options argument must be an object
6464
* @throws {TypeError} must provide valid options
6565
* @throws {TypeError} last argument must be a function
@@ -87,15 +87,15 @@ function bundle( str, dest, options, clbk ) {
8787
var i;
8888

8989
if ( !isString( str ) ) {
90-
throw new TypeError( format( 'invalid argument. First argument must be a string primitive. Value: `%s`.', str ) );
90+
throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );
9191
}
9292
nargs = arguments.length;
9393
opts = {};
9494
if ( nargs === 2 ) {
9595
cb = dest;
9696
} else if ( nargs >= 4 ) {
9797
if ( !isString( dest ) ) {
98-
throw new TypeError( format( 'invalid argument. Second argument must be a string primitive. Value: `%s`.', dest ) );
98+
throw new TypeError( format( 'invalid argument. Second argument must be a string. Value: `%s`.', dest ) );
9999
}
100100
err = validate( opts, options );
101101
if ( err ) {

lib/node_modules/@stdlib/_tools/browserify/string/lib/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ function validate( opts, options ) {
8383
if ( hasOwnProp( options, 'exportName' ) ) {
8484
opts.exportName = options.exportName;
8585
if ( !isString( opts.exportName ) ) {
86-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'exportName', opts.exportName ) );
86+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'exportName', opts.exportName ) );
8787
}
8888
}
8989
if ( hasOwnProp( options, 'standalone' ) ) {
9090
opts.standalone = options.standalone;
9191
if ( !isString( opts.standalone ) ) {
92-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'standalone', opts.standalone ) );
92+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'standalone', opts.standalone ) );
9393
}
9494
}
9595
if ( hasOwnProp( options, 'transforms' ) ) {

lib/node_modules/@stdlib/_tools/bundle/pkg-list/lib/validate.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function validate( opts, options ) {
7272
if ( hasOwnProp( options, 'namespace' ) ) {
7373
opts.namespace = options.namespace;
7474
if ( !isString( opts.namespace ) ) {
75-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'namespace', opts.namespace ) );
75+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'namespace', opts.namespace ) );
7676
}
7777
if ( indexOf( NS, opts.namespace ) === -1 ) {
7878
return new RangeError( format( 'invalid option. `%s` option must be one of the following: `[%s]`.', 'namespace', NS.join( ',' ) ) );
@@ -81,7 +81,7 @@ function validate( opts, options ) {
8181
if ( hasOwnProp( options, 'bundler' ) ) {
8282
opts.bundler = options.bundler;
8383
if ( !isString( opts.bundler ) ) {
84-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'bundler', opts.bundler ) );
84+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'bundler', opts.bundler ) );
8585
}
8686
if ( indexOf( BUNDLERS, opts.bundler ) === -1 ) {
8787
return new RangeError( format( 'invalid option. `%s` option must be one of the following: `[%s]`. Option: `%s`.', 'bundler', BUNDLERS.join( ',' ), opts.bundler ) );
@@ -90,19 +90,19 @@ function validate( opts, options ) {
9090
if ( hasOwnProp( options, 'requireName' ) ) {
9191
opts.requireName = options.requireName;
9292
if ( !isString( opts.requireName ) ) {
93-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'requireName', opts.requireName ) );
93+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'requireName', opts.requireName ) );
9494
}
9595
}
9696
if ( hasOwnProp( options, 'exportName' ) ) {
9797
opts.exportName = options.exportName;
9898
if ( !isString( opts.exportName ) ) {
99-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'exportName', opts.exportName ) );
99+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'exportName', opts.exportName ) );
100100
}
101101
}
102102
if ( hasOwnProp( options, 'standalone' ) ) {
103103
opts.standalone = options.standalone;
104104
if ( !isString( opts.standalone ) ) {
105-
return new TypeError( format( 'invalid option. `%s` option must be a string primitive. Option: `%s`.', 'standalone', opts.standalone ) );
105+
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'standalone', opts.standalone ) );
106106
}
107107
}
108108
if ( hasOwnProp( options, 'transforms' ) ) {

0 commit comments

Comments
 (0)