I don't see a forEach in the async docs, but based on your usage it looks
like you are trying to use forEachOf... Except the 3rd argument of the
iterator would be the callback for moving on to the next item and it
expects an error or null as its only argument. It also expects to be given
an object, not an array. If you are using an array, you'll want async.each,
and your iterator would only get 2 arguments: item and callback.

Can you give a little more context about what you are trying to do and
which module you are trying to do it with?

~Ryan

On Fri, Nov 27, 2015, 3:41 PM Ammar Karim <[email protected]> wrote:

> I am trying to use forEach
>
> async.forEach(TeamList, function (value, key, connectStream) {
>       connectStream(value);
>
>     }, function (err) {
>       if (err) console.error(err.message);
>     })
>
> however, it is telling me that "connectStream" is undefined.
>
> any help?
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/c543e99a-d2c9-49fb-b745-c9c5a93768d8%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/c543e99a-d2c9-49fb-b745-c9c5a93768d8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

~Ryan

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAGjmZGzG2pYDtf%3DjdRg0j%3Dp1Ts2Bz4H_GtT-8YD%2BfJO3XSDwJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to