File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 21
21
// MODULES //
22
22
23
23
var isFunction = require ( '@stdlib/assert-is-function' ) ;
24
+ var format = require ( '@stdlib/string-format' ) ;
24
25
var PINF = require ( '@stdlib/constants-float64-pinf' ) ;
25
26
var validate = require ( './validate.js' ) ;
26
27
var limit = require ( './limit.js' ) ;
@@ -106,7 +107,7 @@ function factory( options, transform ) {
106
107
f = options ;
107
108
}
108
109
if ( ! isFunction ( f ) ) {
109
- throw new TypeError ( 'invalid argument. Last argument must be a function. Value: `' + f + ' `.' ) ;
110
+ throw new TypeError ( format ( 'invalid argument. Last argument must be a function. Value: `%s `.' , f ) ) ;
110
111
}
111
112
if ( opts . series ) {
112
113
opts . limit = 1 ;
@@ -127,10 +128,10 @@ function factory( options, transform ) {
127
128
*/
128
129
function mapKeysAsync ( obj , done ) {
129
130
if ( typeof obj !== 'object' || obj === null ) {
130
- throw new TypeError ( 'invalid argument. First argument must be an object. Value: `' + obj + '.`' ) ;
131
+ throw new TypeError ( format ( 'invalid argument. First argument must be an object. Value: `%s`.' , obj ) ) ;
131
132
}
132
133
if ( ! isFunction ( done ) ) {
133
- throw new TypeError ( 'invalid argument. Last argument must be a function. Value: `' + done + ' `.' ) ;
134
+ throw new TypeError ( format ( 'invalid argument. Last argument must be a function. Value: `%s `.' , done ) ) ;
134
135
}
135
136
return limit ( obj , opts , f , clbk ) ;
136
137
You can’t perform that action at this time.
0 commit comments