pull-stream
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -10,3 +10,3 @@ | ||
for(var k in throughs) | ||
exports[k] = Duplex(throughs[k]) | ||
exports[k] = Through(throughs[k]) | ||
@@ -13,0 +13,0 @@ for(var k in sinks) |
{ | ||
"name": "pull-stream", | ||
"description": "minimal pull stream", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"homepage": "https://github.com/dominictarr/pull-stream", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -42,11 +42,10 @@ | ||
var defer = exports.defer = function () { | ||
var _read, _cb, _end | ||
var _read, cbs = [], _end | ||
var read = function (end, cb) { | ||
if(_cb && !_read) throw new Error( | ||
'do not read twice' + | ||
'without waiting for callback' | ||
) | ||
if(_read) return _read(end, cb) | ||
_end = end, _cb = cb | ||
if(!_read) { | ||
_end = end | ||
cbs.push(cb) | ||
} | ||
else _read(end, cb) | ||
} | ||
@@ -57,3 +56,4 @@ read.resolve = function (read) { | ||
if(!_read) throw new Error('no read cannot resolve!' + _read) | ||
if(_cb) _read(_end, _cb) | ||
while(cbs.length) | ||
_read(_end, cbs.shift()) | ||
} | ||
@@ -60,0 +60,0 @@ read.abort = function(err) { |
@@ -17,3 +17,3 @@ var pull = require('../') | ||
def.resolve( | ||
pull.readArray(ls || []) | ||
pull.values(ls || []) | ||
.pipe(pull.map(function (file) { | ||
@@ -27,7 +27,2 @@ return path.resolve(dir, file) | ||
}) | ||
//.pipe(pull.filter(function (e) {return !/\/\./.test(e)} )) | ||
/*.pipe(pull.map(function (d) { | ||
return path.relative(start, d) | ||
}))*/ | ||
} | ||
@@ -72,3 +67,3 @@ | ||
var expected = {} | ||
// expected[start] = true | ||
// expected[start] = true | ||
//assert that for each item, | ||
@@ -94,4 +89,1 @@ //you have seen the dir already | ||
//ls_r(start, pull.leafFirst) | ||
//.pipe(pull.log()) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24454
556