Skip to content

Commit 02736a3

Browse files
committed
Auto-generated commit
1 parent 0b4baae commit 02736a3

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var hasOwnProp = require( '@stdlib/assert-has-own-property' );
3131
var MAX_VALUE = require( '@stdlib/constants-float64-max' );
3232
var minstd = require( '@stdlib/random-base-minstd' ).factory;
3333
var iteratorSymbol = require( '@stdlib/symbol-iterator' );
34+
var format = require( '@stdlib/string-format' );
3435

3536

3637
// MAIN //
@@ -71,17 +72,17 @@ function iterator( options ) {
7172
var i;
7273
if ( arguments.length > 0 ) {
7374
if ( !isObject( options ) ) {
74-
throw new TypeError( 'invalid argument. Options argument must be an object. Value: `'+options+'`.' );
75+
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
7576
}
7677
opts = copy( options, 1 );
7778
if ( hasOwnProp( opts, 'normalized' ) ) {
7879
if ( !isBoolean( opts.normalized ) ) {
79-
throw new TypeError( 'invalid option. `normalized` option must be a boolean primitive. Option: `'+opts.normalized+'`.' );
80+
throw new TypeError( format( 'invalid option. `%s` option must be a boolean primitive. Option: `%s`.', 'normalized', opts.normalized ) );
8081
}
8182
}
8283
if ( hasOwnProp( opts, 'iter' ) ) {
8384
if ( !isNonNegativeInteger( opts.iter ) ) {
84-
throw new TypeError( 'invalid option. `iter` option must be a nonnegative integer. Option: `'+opts.iter+'`.' );
85+
throw new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'iter', opts.iter ) );
8586
}
8687
} else {
8788
opts.iter = MAX_VALUE;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@stdlib/assert-is-plain-object": "^0.0.x",
4444
"@stdlib/constants-float64-max": "^0.0.x",
4545
"@stdlib/random-base-minstd": "^0.0.x",
46+
"@stdlib/string-format": "^0.0.x",
4647
"@stdlib/symbol-iterator": "^0.0.x",
4748
"@stdlib/types": "^0.0.x",
4849
"@stdlib/utils-copy": "^0.0.x",

0 commit comments

Comments
 (0)