forEachAsync ~2.2 -> foreachasync 3.x

This commit is contained in:
AJ ONeal 2014-05-20 17:12:07 -06:00
parent 754f6bb9c4
commit a91f404fc7
3 changed files with 12 additions and 6 deletions

View File

@ -2,13 +2,10 @@
(function () {
"use strict";
// Array.prototype.forEachAsync(next, item, i, collection)
//require('Array.prototype.forEachAsync');
function noop() {}
var fs = require('fs')
, forEachAsync = require('forEachAsync')
, forEachAsync = require('foreachasync').forEachAsync
, EventEmitter = require('events').EventEmitter
, TypeEmitter = require('./node-type-emitter')
, util = require('util')

View File

@ -13,11 +13,11 @@
"author": "AJ ONeal <coolaj86@gmail.com>",
"contributors": [],
"dependencies": {
"forEachAsync": "~2.2"
"foreachasync": "3.x"
},
"lib": ".",
"main": "./lib/walk.js",
"version": "2.3.1",
"version": "2.3.2",
"repository": {
"url": "git://github.com/coolaj86/node-walk.git"
},

View File

@ -9,10 +9,19 @@
walker = walk(dirname);
walker.on('directories', function (root, stats, next) {
stats.forEach(function (stat) {
console.log('[ds]', path.join(root, stat.name));
});
next();
});
/*
walker.on('directory', function (root, stat, next) {
console.log('[d]', path.join(root, stat.name));
next();
});
*/
walker.on('file', function (root, stat, next) {
console.log('[f]', path.join(root, stat.name));