Permalink
Browse files

fixed examples to use !this.paused as well as this.writable

  • Loading branch information...
1 parent 2a9d2a4 commit 8e1ef68b07d943246917962fbaae10e74d19ed54 @deoxxa committed Oct 19, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 README.md
  2. +1 −1 example.js
  3. +1 −1 index.js
View
@@ -43,7 +43,7 @@ util.inherits(ChunkReverser, Steez);
ChunkReverser.prototype.write = function write(data) {
this.emit("data", Buffer(data.toString().split("").reverse().join("")));
- return this.writable;
+ return !this.paused && this.writable;
};
var chunk_reverser = new ChunkReverser();
View
@@ -13,7 +13,7 @@ util.inherits(ChunkReverser, Steez);
ChunkReverser.prototype.write = function write(data) {
this.emit("data", Buffer(data.toString().split("").reverse().join("")));
- return this.writable;
+ return !this.paused && this.writable;
};
var chunkreverser = new ChunkReverser();
View
@@ -29,7 +29,7 @@ Steez.prototype.emit = function emit() {
Steez.prototype.write = function write(data) {
this.emit("data", data);
- return this.writable;
+ return !this.paused && this.writable;
};
Steez.prototype.pause = function pause() {

0 comments on commit 8e1ef68

Please sign in to comment.