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 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
+ var format = require ( '@stdlib/error-tools-fmtprodmsg ' ) ;
25
25
26
26
27
27
// MAIN //
@@ -58,13 +58,13 @@ function compose() {
58
58
var i ;
59
59
nFuncs = arguments . length ;
60
60
if ( nFuncs < 2 ) {
61
- throw new Error ( 'insufficient arguments. Must provide multiple functions to compose.' ) ;
61
+ throw new Error ( format ( '1SB1Y' ) ) ;
62
62
}
63
63
f = new Array ( nFuncs ) ;
64
64
for ( i = 0 ; i < nFuncs ; i ++ ) {
65
65
f [ i ] = arguments [ i ] ;
66
66
if ( ! isFunction ( f [ i ] ) ) {
67
- throw new TypeError ( format ( 'invalid argument. All arguments must be functions. Value: `%s`. ' , f [ i ] ) ) ;
67
+ throw new TypeError ( format ( '1SBAj ' , f [ i ] ) ) ;
68
68
}
69
69
}
70
70
return composite ;
Original file line number Diff line number Diff line change 38
38
},
39
39
"dependencies" : {
40
40
"@stdlib/assert-is-function" : " ^0.2.2" ,
41
- "@stdlib/string-format " : " ^0.2.2" ,
41
+ "@stdlib/error-tools-fmtprodmsg " : " ^0.2.2" ,
42
42
"@stdlib/error-tools-fmtprodmsg" : " ^0.2.2"
43
43
},
44
44
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments