forEachAsync ~2.2 -> foreachasync 3.x
This commit is contained in:
parent
754f6bb9c4
commit
a91f404fc7
|
@ -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')
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue