stdlib-js / random-base-box-muller
Showing 1 of 3 files from the diff.
Other files ignored by Codecov
package.json has changed.

@@ -32,6 +32,7 @@
Loading
32 32
var constantFunction = require( '@stdlib/utils-constant-function' );
33 33
var noop = require( '@stdlib/utils-noop' );
34 34
var typedarray2json = require( '@stdlib/array-to-json' );
35 +
var format = require( '@stdlib/string-format' );
35 36
var randn0 = require( './randn.js' );
36 37
var getMin = require( './min.js' );
37 38
var getMax = require( './max.js' );
@@ -78,17 +79,17 @@
Loading
78 79
	};
79 80
	if ( arguments.length ) {
80 81
		if ( !isObject( options ) ) {
81 -
			throw new TypeError( 'invalid argument. Must provide an object. Value: `' + options + '`.' );
82 +
			throw new TypeError( format( 'invalid argument. Must provide an object. Value: `%s`.', options ) );
82 83
		}
83 84
		if ( hasOwnProp( options, 'copy' ) ) {
84 85
			opts.copy = options.copy;
85 86
			if ( !isBoolean( options.copy ) ) {
86 -
				throw new TypeError( 'invalid option. `copy` option must be a boolean. Option: `' + options.copy + '`.' );
87 +
				throw new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', options.copy ) );
87 88
			}
88 89
		}
89 90
		if ( hasOwnProp( options, 'prng' ) ) {
90 91
			if ( !isFunction( options.prng ) ) {
91 -
				throw new TypeError( 'invalid option. `prng` option must be a pseudorandom number generator function. Option: `' + options.prng + '`.' );
92 +
				throw new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', options.prng ) );
92 93
			}
93 94
			randu = options.prng;
94 95
		}
@@ -96,14 +97,14 @@
Loading
96 97
		else if ( hasOwnProp( options, 'state' ) ) {
97 98
			opts.state = options.state;
98 99
			if ( !isUint32Array( options.state ) ) {
99 -
				throw new TypeError( 'invalid option. `state` option must be a Uint32Array. Option: `' + options.state + '`.' );
100 +
				throw new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', options.state ) );
100 101
			}
101 102
		}
102 103
		// If provided a PRNG, ignore the `seed` option, as a `seed`, by itself, is insufficient to guarantee reproducibility. If provided a state, ignore the `seed` option, as a PRNG state should contain seed information.
103 104
		else if ( hasOwnProp( options, 'seed' ) ) {
104 105
			opts.seed = options.seed;
105 106
			if ( options.seed === void 0 ) {
106 -
				throw new TypeError( 'invalid option. `seed` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `' + options.seed + '`.' );
107 +
				throw new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', options.seed ) );
107 108
			}
108 109
		}
109 110
	}
Files Coverage
lib 100.00%
Project Totals (6 files) 100.00%
2007657880
unittests
2006038522
unittests
2080716872
unittests
2043493729
unittests
2175307128
unittests
2139180651
unittests
2248735045
unittests
2211027985
unittests
2322834332
unittests
2285024039
unittests

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading