Created
January 23, 2015 17:23
-
-
Save broguinn/78255067e40b0c97e8cd to your computer and use it in GitHub Desktop.
ASQ map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In asynquence-contrib | |
var emptyItems = [], | |
sq = ASQ(); | |
sq.map(emptyItems, function(item, done){ | |
// do some things to item | |
item.values = []; | |
done(item); | |
}); | |
sq.map(function(item, done) { | |
// iterates once, throws | |
// "Type Error: cannot read property `values` of undefined" | |
ASQ().map(item.values, function(value, valueDone) { | |
valueDone(value); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment