pull-stream
Advanced tools
Comparing version 2.15.1 to 2.16.0
26
index.js
@@ -45,15 +45,15 @@ | ||
function addReaderPipe(reader) { | ||
var piped = [] | ||
function _reader (read) { | ||
read = reader(read) | ||
while(piped.length) | ||
read = piped.shift()(read) | ||
return read | ||
//pipeing to from this reader should compose... | ||
} | ||
_reader.pipe = function (read) { | ||
piped.push(read) | ||
return reader | ||
} | ||
return _reader | ||
var piped = [] | ||
function _reader (read) { | ||
read = reader(read) | ||
while(piped.length) | ||
read = piped.shift()(read) | ||
return read | ||
//pipeing to from this reader should compose... | ||
} | ||
_reader.pipe = function (read) { | ||
piped.push(read) | ||
return reader | ||
} | ||
return _reader | ||
} | ||
@@ -60,0 +60,0 @@ |
{ | ||
"name": "pull-stream", | ||
"description": "minimal pull stream", | ||
"version": "2.15.1", | ||
"version": "2.16.0", | ||
"homepage": "https://github.com/dominictarr/pull-stream", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -47,3 +47,2 @@ var u = require('./util') | ||
function pull () { | ||
// console.log('pull', cb) | ||
read(null, function (end, data) { | ||
@@ -127,4 +126,2 @@ if(end) { | ||
} | ||
// else | ||
// test = tester(test) | ||
@@ -220,19 +217,20 @@ return function (end, cb) { | ||
} | ||
} | ||
/* var chunk | ||
return function (end, cb) { | ||
//this means that the upstream is sending an error. | ||
if(end) return read(ended = end, cb) | ||
var prepend = | ||
exports.prepend = | ||
function (read, head) { | ||
if(chunk && chunk.length) | ||
return cb(null, chunk.shift()) | ||
return function (abort, cb) { | ||
if(head !== null) { | ||
if(abort) | ||
return read(abort, cb) | ||
var _head = head | ||
head = null | ||
cb(null, _head) | ||
} else { | ||
read(abort, cb) | ||
} | ||
} | ||
read(null, function (err, data) { | ||
if(err) return cb(err) | ||
chunk = data | ||
if(chunk && chunk.length) | ||
return cb(null, chunk.shift()) | ||
}) | ||
}*/ | ||
} | ||
@@ -239,0 +237,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
27
1000
38660