dir-stream
Advanced tools
Comparing version 0.0.16 to 0.0.17
17
index.js
@@ -9,3 +9,3 @@ var path = require('path') | ||
function dirstream(_options) { | ||
var stream = through(write, noop) | ||
var stream = through(write, next_dir) | ||
, ls = null | ||
@@ -29,3 +29,5 @@ , arr = [] | ||
.on('end', next_dir) | ||
.on('error', noop) | ||
.on('error', function(err) { | ||
stream.emit('error', err) | ||
}) | ||
@@ -54,10 +56,9 @@ function process_dir(data) { | ||
} | ||
} | ||
function next_dir() { | ||
if(!arr.length) return stream.queue(null) | ||
do_dir(arr.shift()) | ||
} | ||
function next_dir() { | ||
if(!arr.length || !ls) return stream.queue(null) | ||
do_dir(arr.shift()) | ||
} | ||
} | ||
function noop(){} |
{ | ||
"name": "dir-stream", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "stream filenames", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7477
188