[ISSUE #5] Array.prototype.forEachAsync -> forEachAsync

This commit is contained in:
AJ ONeal 2011-11-01 16:02:58 -06:00
parent 1ea316fcbc
commit 2dd4eee860
2 changed files with 9 additions and 7 deletions

View File

@ -6,9 +6,9 @@
"author" : "AJ ONeal <coolaj86@gmail.com>", "author" : "AJ ONeal <coolaj86@gmail.com>",
"contributors" : [], "contributors" : [],
"dependencies" : { "dependencies" : {
"Array.prototype.forEachAsync": ">= 2.1.0" "forEachAsync": ">= 2.1.0"
}, },
"lib" : ".", "lib" : ".",
"main" : "./walk.js", "main" : "./walk.js",
"version" : "2.0.1" "version" : "2.0.2"
} }

View File

@ -3,13 +3,15 @@
"use strict" "use strict"
// Array.prototype.forEachAsync(next, item, i, collection) // Array.prototype.forEachAsync(next, item, i, collection)
require('Array.prototype.forEachAsync'); //require('Array.prototype.forEachAsync');
function noop() {} function noop() {}
var fs = require('fs'), var fs = require('fs')
EventEmitter = require('events').EventEmitter, , forEachAsync = require('forEachAsync')
TypeEmitter = require('./node-type-emitter'); , EventEmitter = require('events').EventEmitter
, TypeEmitter = require('./node-type-emitter')
;
function create(pathname, options, sync) { function create(pathname, options, sync) {
var emitter = new EventEmitter() var emitter = new EventEmitter()
@ -86,7 +88,7 @@
}); });
postFilesHandler(); postFilesHandler();
} else { } else {
files.forEachAsync(filesHandler).then(postFilesHandler); forEachAsync(files, filesHandler).then(postFilesHandler);
} }
} }