8000 Auto-generated commit · stdlib-js/utils-async-map-keys@99edcfb · GitHub
[go: up one dir, main page]

Skip to content

Commit 99edcfb

Browse files
committed
Auto-generated commit
1 parent b1416f3 commit 99edcfb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/.keepalive

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

lib/factory.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var isFunction = require( '@stdlib/assert-is-function' );
24+
var format = require( '@stdlib/string-format' );
2425
var PINF = require( '@stdlib/constants-float64-pinf' );
2526
var validate = require( './validate.js' );
2627
var limit = require( './limit.js' );
@@ -106,7 +107,7 @@ function factory( options, transform ) {
106107
f = options;
107108
}
108109
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 ) );
110111
}
111112
if ( opts.series ) {
112113
opts.limit = 1;
@@ -127,10 +128,10 @@ function factory( options, transform ) {
127128
*/
128129
function mapKeysAsync( obj, done ) {
129130
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 ) );
131132
}
132133
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 ) );
134135
}
135136
return limit( obj, opts, f, clbk );
136137

0 commit comments

Comments
 (0)
0