Skip to content

Instantly share code, notes, and snippets.

@dfellis
dfellis / gist:6928436
Last active December 25, 2015 05:59 — forked from gmp/gist:6927324
namespaced queues working properly again in 0.6.20 and 0.7.8
var q = require('queue-flow');
function scanAll (data, callback) {
console.log('scanAll with data:', data);
var localQ = q.ns();
var items = [];
localQ('end')
.each(function() {
@dfellis
dfellis / gist:6927599
Last active December 25, 2015 05:49 — forked from gmp/gist:6927324
locally scoping, but the result is an infinite loop for the second scanAll
var q = require('queue-flow');
function scanAll (data, callback) {
console.log('scanAll with data:', data);
var counter = 0;
var items = [];
var end = q();
@dfellis
dfellis / functions.js
Last active December 19, 2015 01:59 — forked from jingidy/functions.js
var q = require('queue-flow');
function asyncEmptyArray (args, callback) {
console.log('empty array');
callback(null, []);
}
function poof (callback) {
q([null])
.node(asyncEmptyArray, callback)