Comparing version 0.0.2 to 0.0.3
13
index.js
@@ -27,6 +27,7 @@ var Stream = require('stream').Stream; | ||
if (typeof chunk == 'string') chunk = new Buffer(chunk); | ||
chunk = this.data(chunk); | ||
//console.log(chunk.toString()); | ||
//chunk = this.data(chunk); | ||
if (this.writable) { | ||
this.buffer.concat(chunk); | ||
if (this.readable && !this.paused) this.emit('data', chunk); | ||
if (this.readable/* && !this.paused*/) this.emit('data', chunk); | ||
} else { | ||
@@ -46,5 +47,5 @@ this.pausedCache.concat(chunk); | ||
dataStream.prototype.end = function () { | ||
this.emit('complate'); | ||
this.emit('complete'); | ||
this.ended = true; | ||
if (this.readable && !this.paused) this.emit('end'); | ||
if (this.readable/* && !this.paused*/) this.emit('end'); | ||
return this; | ||
@@ -74,3 +75,3 @@ }; | ||
} else { | ||
this.on('complate', function () { | ||
this.on('complete', function () { | ||
this.emit('data', this.buffer.toBuffer()); | ||
@@ -82,2 +83,2 @@ this.emit('end'); | ||
}; | ||
module.exports = dataStream; | ||
module.exports = dataStream; |
@@ -9,3 +9,3 @@ { | ||
"description": "Simple stream piper", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"repository": { | ||
@@ -26,9 +26,9 @@ "url": "" | ||
}, | ||
"_id": "dataStream@0.0.1", | ||
"_id": "dataStream@0.0.3", | ||
"optionalDependencies": {}, | ||
"_engineSupported": true, | ||
"_npmVersion": "1.1.4", | ||
"_nodeVersion": "v0.6.12", | ||
"_npmVersion": "1.1.24", | ||
"_nodeVersion": "v0.6.19", | ||
"_defaultsLoaded": true, | ||
"_from": "dataStream@0.0.1" | ||
"_from": "dataStream@latest" | ||
} |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
3185
4
1
4