We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, How can i use implicit args list for auto and autoinject. I use async 2.1.5 and nodeJs 4.2.6
eg:
var args = [ 'arg1', 'arg2', 'arg3' ] , funcList = { arg1: function(cb){ cb(null,'xyz') }, arg2: function(cb){ cb(null,'xyz') }, arg3: function(cb){ cb(null,'xyz') } }
funcList[ 'arg4' ] = [args, function( r, cb ){ // use or change r[ args[0] ] or r[ args[1] ] ... }]
async.auto(funcList, callback);
at the run time i get Error: async.auto task arg4 has a non-existent dependency arg1, arg2, arg3 in arg1, arg2, arg3
arg4
arg1, arg2, arg3
The text was updated successfully, but these errors were encountered:
Change it to:
funcList[ 'arg4' ] = args.concat(function( r, cb ){ // use or change r[ args[0] ] or r[ args[1] ] ... })
Sorry, something went wrong.
Thanks, it's worked with auto method but how can use it for autoinject?
You can't have dynamic args in autoInject. All args have to be explicit in the function definitions.
No branches or pull requests
Hi,
How can i use implicit args list for auto and autoinject.
I use async 2.1.5 and nodeJs 4.2.6
eg:
var args = [ 'arg1', 'arg2', 'arg3' ] ,
funcList = {
arg1: function(cb){ cb(null,'xyz') },
arg2: function(cb){ cb(null,'xyz') },
arg3: function(cb){ cb(null,'xyz') }
}
funcList[ 'arg4' ] = [args, function( r, cb ){
// use or change r[ args[0] ] or r[ args[1] ] ...
}]
async.auto(funcList, callback);
at the run time i get Error: async.auto task
arg4
has a non-existent dependencyarg1, arg2, arg3
in arg1, arg2, arg3The text was updated successfully, but these errors were encountered: