Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Set readable and writable to false on end.

When a stream ends, it should not be writable.

Signed-off-by: Tim Smart <tim@fostle.com>
  • Loading branch information...
commit 627fe600520b1710efddaa93663ec4695a14fd8c 1 parent 8c4679e
Tim authored

Showing 2 changed files with 6 additions and 7 deletions. Show diff stats Hide diff stats

  1. +2 0  index.js
  2. +4 7 package.json
2  index.js
@@ -125,6 +125,8 @@ FilterStream.prototype.write = function (data) {
125 125 * End method called by pipe()
126 126 */
127 127 FilterStream.prototype.end = function () {
  128 + this.writable = false;
  129 + this.readable = false;
128 130 this.emit('end');
129 131 this.emit('close');
130 132 };
11 package.json
... ... @@ -1,20 +1,17 @@
1 1 {
2 2 "name": "filter",
3   - "version": "0.1.0",
  3 + "version": "0.1.1",
4 4 "description": "A stream filter for node, to create pipable filters for arbitary streams.",
5 5 "repository": {
6 6 "type": "git",
7   - "url": "http://github.com/votizen/node-filter.git"
  7 + "url": "http://github.com/tim-smart/node-filter.git"
8 8 },
9 9 "main": "./",
10 10 "bugs": {
11   - "web": "http://github.com/votizen/node-filter/issues"
  11 + "web": "http://github.com/tim-smart/node-filter/issues"
12 12 },
13 13 "author": "Tim Smart <tim@fostle.com>",
14 14 "licenses": [{
15 15 "type": "MIT"
16   - }],
17   - "engines": {
18   - "node": ">=0.4.1"
19   - }
  16 + }]
20 17 }

0 comments on commit 627fe60

Please sign in to comment.
Something went wrong with that request. Please try again.