stdlib-js / random-base-triangular

@@ -44,16 +44,16 @@
Loading
44 44
*/
45 45
function validate( a, b, c ) {
46 46
	if ( !isNumber( a ) || isnan( a ) ) {
47 -
		return new TypeError( format( 'invalid argument. First argument must be a number and not `NaN`. Value: `%s`.', a ) );
47 +
		return new TypeError( format( 'invalid argument. First argument must be a number and not NaN. Value: `%s`.', a ) );
48 48
	}
49 49
	if ( !isNumber( b ) || isnan( b ) ) {
50 -
		return new TypeError( format( 'invalid argument. Second argument must be a number and not `NaN`. Value: `%s`.', b ) );
50 +
		return new TypeError( format( 'invalid argument. Second argument must be a number and not NaN. Value: `%s`.', b ) );
51 51
	}
52 52
	if ( !isNumber( c ) || isnan( c ) ) {
53 -
		return new TypeError( format( 'invalid argument. Third argument must be a number and not `NaN`. Value: `%s`.', c ) );
53 +
		return new TypeError( format( 'invalid argument. Third argument must be a number and not NaN. Value: `%s`.', c ) );
54 54
	}
55 55
	if ( !(a <= c && c <= b) ) {
56 -
		return new RangeError( format( 'invalid arguments. The condition `a <= c <= b` must be satisfied. Value: `[%f,%f,%f]`.', a, b, c ) );
56 +
		return new RangeError( format( 'invalid arguments. Parameters must satisfy the following condition: %s. Value: `[%f, %f, %f]`.', 'a <= c <= b', a, b, c ) );
57 57
	}
58 58
	return null;
59 59
}

@@ -89,7 +89,7 @@
Loading
89 89
		}
90 90
		if ( hasOwnProp( opts, 'prng' ) ) {
91 91
			if ( !isFunction( opts.prng ) ) {
92 -
				throw new TypeError( format( 'invalid option. `prng` option must be a pseudorandom number generator function. Option: `%s`.', opts.prng ) );
92 +
				throw new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );
93 93
			}
94 94
			rand = opts.prng;
95 95
		} else {
@@ -110,7 +110,7 @@
Loading
110 110
			}
111 111
			if ( hasOwnProp( opts, 'prng' ) ) {
112 112
				if ( !isFunction( opts.prng ) ) {
113 -
					throw new TypeError( format( 'invalid option. `prng` option must be a pseudorandom number generator function. Option: `%s`.', opts.prng ) );
113 +
					throw new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );
114 114
				}
115 115
				rand = opts.prng;
116 116
			} else {
Files Coverage
lib 100.00%
Project Totals (5 files) 100.00%
2285362470
unittests
2252030329
unittests
2361987563
unittests
2323080726
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