pull-stream
Advanced tools
| var pull = require('../') | ||
| pull.values([1, 2, 3]) | ||
| .pipe(pull.prepend(0)) | ||
| .pipe(pull.collect(function (err, ary) { | ||
| console.log(ary) | ||
| })) |
+13
-13
@@ -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 @@ |
+1
-1
| { | ||
| "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": { |
+15
-17
@@ -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 @@ |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
27
3.85%1000
0.5%38660
-0.18%