Comparing version 1.1.0 to 1.1.1
22
index.js
@@ -23,2 +23,12 @@ //another idea: buffer 2* the max, but only call write with half of that, | ||
var reading = false | ||
function more () { | ||
if(reading || ended) return | ||
reading = true | ||
read(null, function (err, data) { | ||
reading = false | ||
next(err, data) | ||
}) | ||
} | ||
function flush () { | ||
@@ -38,3 +48,3 @@ if(writing) return | ||
else if(length) flush() | ||
else read(null, next) | ||
else more() | ||
}) | ||
@@ -50,3 +60,3 @@ } | ||
if(queue != null) flush() | ||
if(length < max) read(null, next) | ||
if(length < max) more() | ||
} | ||
@@ -69,3 +79,3 @@ else if(!writing) cb(ended === true ? null : ended) | ||
read(null, next) | ||
more() | ||
} | ||
@@ -83,1 +93,7 @@ | ||
{ | ||
"name": "pull-write", | ||
"description": "", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "https://github.com/dominictarr/pull-write", | ||
@@ -10,3 +10,6 @@ "repository": { | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"pull-cat": "^1.1.11", | ||
"pull-stream": "^3.4.5" | ||
}, | ||
"devDependencies": { | ||
@@ -13,0 +16,0 @@ "pull-cat": "^1.1.9", |
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
9692
242
2
+ Addedpull-cat@^1.1.11
+ Addedpull-stream@^3.4.5
+ Addedpull-cat@1.1.11(transitive)
+ Addedpull-stream@3.7.0(transitive)