File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ var setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-propert
24
24
var iteratorSymbol = require ( '@stdlib/symbol-iterator' ) ;
25
25
var abs = require ( '@stdlib/math-base-special-abs' ) ;
26
26
var cospi = require ( '@stdlib/math-base-special-cospi' ) ;
27
+ var format = require ( '@stdlib/string-format' ) ;
27
28
var validate = require ( './validate.js' ) ;
28
29
29
30
@@ -111,10 +112,10 @@ function iterBartlettHannPulse( options ) {
111
112
opts . duration = opts . period ;
112
113
}
113
114
if ( opts . duration > opts . period ) {
114
- throw new RangeError ( 'invalid option. `duration ` option must be less than or equal to the period. Option: `' + opts . duration + '`.' ) ;
115
+ throw new RangeError ( format ( 'invalid option. `%s ` option must be less than or equal to the period. Option: `%u`.' , 'duration' , opts . duration ) ) ;
115
116
}
116
117
if ( opts . duration <= 2 ) {
117
- throw new RangeError ( 'invalid option. `duration ` option must be greater than 2. Option: `' + opts . duration + '`.' ) ;
118
+ throw new RangeError ( format ( 'invalid option. `%s ` option must be greater than 2. Option: `%s`.' , 'duration' , opts . duration ) ) ;
118
119
}
119
120
t = ( opts . period - opts . offset ) % opts . period ;
120
121
if ( t < 0 ) {
You can’t perform that action at this time.
0 commit comments