Skip to content
New issue

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

Bug in auto/autoInject for tasks of the form [ <function> ] #1147

Closed
miguel76 opened this issue May 7, 2016 · 0 comments
Closed

Bug in auto/autoInject for tasks of the form [ <function> ] #1147

miguel76 opened this issue May 7, 2016 · 0 comments
Labels

Comments

@miguel76
Copy link

miguel76 commented May 7, 2016

In .auto(), tasks with no dependencies may be defined either by a function or an array containing a single function.
The second form actually gives an error cause in this line the array get enclosed in another array.
This is not crucial .auto() itself, but a bit limiting when using .autoInject(), cause the array form is an alternative to using explicit parameters, like in the example below.

async.autoInject({
  'input-string': [async.apply(fs.readFile, inputFilename, 'utf8')],
  input: ['input-string', async.asyncify(JSON.parse)],
  ...
}, callback); 
@aearly aearly closed this as completed in e235125 May 9, 2016
@aearly aearly added the bug label May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants