Permalink
Browse files

small tweaks

  • Loading branch information...
1 parent 1a33a92 commit 7fdadc356b2bee4844897d99647ecf893073719c @Raynos committed Sep 27, 2012
Showing with 4 additions and 12 deletions.
  1. +2 −6 examples/to.js
  2. +2 −6 index.js
View
@@ -39,13 +39,9 @@ function createInput() {
if (++count < 5) {
return count
} else {
- s.end()
+ s.emit("end")
}
}
- s.end = function () {
- s.emit("end")
- }
-
return s
-}
+}
View
@@ -1,7 +1,5 @@
var Stream = require("stream")
-WriteStream.end = defaultEnd
-
module.exports = WriteStream
WriteStream.toArray = require("./array")
@@ -10,7 +8,7 @@ function WriteStream(write, end) {
var stream = new Stream()
, ended = false
- end = end || defaultEnd
+ end = end || noop
stream.write = handleWrite
stream.end = handleEnd
@@ -35,6 +33,4 @@ function WriteStream(write, end) {
}
}
-function defaultEnd() {
- this.emit("end")
-}
+function noop() {}

0 comments on commit 7fdadc3

Please sign in to comment.