Permalink
Browse files

added filter to children function

  • Loading branch information...
1 parent af81394 commit af7df8e2831c4d1fd84013b8a8a60a13abd9b705 @tommy351 committed Sep 3, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 lib/qfs.js
View
@@ -311,7 +311,13 @@ utils.each({
async.parallel(fn, function(err, results){
if (err) return callback(err);
+
var arr = qfs(utils.merge.apply(null, results));
+
+ if (selector){
+ arr = arr.filter(selector);
+ }
+
callback.call(_this, err, arr);
});
@@ -328,7 +334,11 @@ utils.each({
}));
});
- return qfs(arr);
+ if (selector){
+ return qfs(arr).filter(selector);
+ } else {
+ return qfs(arr);
+ }
}
],
mkdir: [

0 comments on commit af7df8e

Please sign in to comment.