pull-stream
Advanced tools
Comparing version 2.9.1 to 2.9.2
{ | ||
"name": "pull-stream", | ||
"description": "minimal pull stream", | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"homepage": "https://github.com/dominictarr/pull-stream", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -27,3 +27,3 @@ | ||
if(end) return cb && cb(end) | ||
if(max <= i) | ||
if(i > max) | ||
return cb(true) | ||
@@ -30,0 +30,0 @@ cb(null, i++) |
@@ -10,3 +10,5 @@ | ||
t.ok(true) | ||
t.end() | ||
process.nextTick(function () { | ||
t.end() | ||
}) | ||
})) | ||
@@ -13,0 +15,0 @@ .pipe(pull.take(10)) |
@@ -77,22 +77,18 @@ function prop (map) { | ||
var n = test; test = function () { | ||
return n-- > 0 | ||
return n --> 0 | ||
} | ||
} | ||
return function (end, cb) { | ||
if(end) { | ||
if(!ended) return ended = end, read(end, cb) | ||
cb(ended) | ||
} | ||
return read(null, function (end, data) { | ||
if(ended) return | ||
if(end) return cb(ended = end) | ||
if(ended = ended || end) | ||
return read(ended, cb) | ||
read(null, function (end, data) { | ||
if(ended = ended || end) return cb(ended) | ||
//TODO, CHECK THAT END LOGIC IS CORRECT WITH TAKE!!! | ||
if(!test(data)) { | ||
ended = true | ||
nextTick(function () { | ||
read(true, function (){}) | ||
}) | ||
return cb(true) | ||
read(true, cb) | ||
} | ||
return cb(null, data) | ||
else | ||
cb(null, data) | ||
}) | ||
@@ -99,0 +95,0 @@ } |
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
29804
736