node-async Questions
6
Solved
I'm using caolan's async.js library, specifically the .each method.
How do you get access to the index in the iterator?
async.each(ary, function(element, callback){
//do stuff here for each elem...
Skimpy asked 7/7, 2013 at 22:21
2
I wrote a module in node.js that performs some network operation. I wrote a small script that uses this module (the variable check below). It looks like this:
check(obj, function (err, results) {
...
Asymmetry asked 7/4, 2013 at 0:33
4
Solved
The nodejs async module: https://github.com/caolan/async provides 2 similar methods, async.waterfall and async.series.
What is the difference between them?
Irreversible asked 13/2, 2012 at 10:3
2
I am trying to execute a series of functions, each passing the callback to the next. Right now it looks like this (excuse any minor errors, I am rewriting it as I post!):
function func1(callback) ...
Ornas asked 6/1, 2011 at 18:9
2
Solved
I am using aync.parallel to run two functions in parallel. The functions request RSS feeds. Then the RSS feeds are parsed and added to my web page.
But for some reason async.parallel runs the call...
Klatt asked 25/11, 2013 at 7:22
3
Solved
In many examples of Nodejs/Express, I see that calling next() is optional in case of success.
exports.postLogin = (req, res, next) => {
passport.authenticate("local", (err, user, info) =>...
Mireillemireles asked 29/5, 2017 at 8:43
2
Solved
I am using the node async lib - https://github.com/caolan/async#forEach and would like to iterate through an object and print out its index key. Once complete I would like execute a callback.
Here...
Item asked 30/4, 2012 at 20:19
1
I need to perform a cyclic call to some external API with some delay, to prevent from 'User Rate Limit Exceeded' restriction.
Google Maps Geocoding API is sensitive to 'req/sec', allowing 10 req/s...
Tessi asked 19/4, 2016 at 22:40
1
Solved
I have a question regarding passing arguments in async.waterfall() to the third function rather than the first function. For example, as following
async.waterfall([
first,
second,
async.apply(t...
Lure asked 29/3, 2016 at 18:33
1
I have nested inner functions with callback that are with in the single function(abcd).
I need to call abcd function from outside using async and return the response.
var listFunctions = {
test1...
Whitsunday asked 3/3, 2016 at 10:23
1
Solved
So lets say fruits is an array containing 4 items
What I expected was that the code below would print fruit with a 4 second delay between each fruit.
var fruits = ['blueberries', 'strawberries', '...
Nachison asked 10/8, 2015 at 22:9
1
Solved
I'm studying the node.js module async, but I have some problems with the function async.retry.
According to its github docs,
the function will continue trying the task until it succeeds or chances...
Siltstone asked 11/3, 2015 at 2:39
3
I'm new to Node.Js and JavaScript web development on the backend. I see that callbacks inside callbacks could be a pain and there are modules to avoid that. One of these modules is async, https://g...
Dorcasdorcea asked 7/1, 2014 at 0:32
2
Solved
var async = require('async');
async.parallel([
function(cb) {
cb(true);
},
function(cb) {
cb(null, true);
}],
function(error, results) {
}
);
In the code, if the first task runs cb(true)...
Evidently asked 3/2, 2014 at 20:31
1
Solved
I'm using the Q library and async library in nodejs.
Here's an example of my code:
async.each(items, cb, function(item) {
saveItem.then(function(doc) {
cb();
});
}, function() {
});
saveI...
Autolysin asked 16/12, 2013 at 18:46
1
Solved
I am trying to reduce the nesting of async calls (node + socket.io) by using async.waterfall and I ended up having to append parameters down the waterfall because they are needed later. This code m...
Cerelly asked 2/9, 2012 at 21:46
1
Solved
This piece of code was taken straight out of the example from: https://github.com/caolan/async#seriestasks-callback
var async = require("async");
async.series([
function() { console.log("a"); },...
Gigantopithecus asked 28/5, 2012 at 3:45
1
Solved
I am using the node.js async package, specifically forEachSeries, to make a series of http requests based on parameters drawn from an array. In the callback of each request I have some if/else stat...
Edging asked 11/4, 2012 at 13:15
1
© 2022 - 2024 — McMap. All rights reserved.