Skip to content

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

@miguel76

Description

@miguel76

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); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions