Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

properly emitting data events

  • Loading branch information...
commit efd1c02e8d0b97c485c148457084251b19011e21 1 parent c03ef91
@luk- authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 index.js
View
4 index.js
@@ -24,13 +24,11 @@ module.exports = function (data, html) {
if (!html) {
var stream = new Stream
stream.writable = stream.readable = true
- var htmlBuffer = ''
stream.write = function (buf) {
- htmlBuffer += buf.toString()
+ this.emit('data', plant(data, buf.toString()))
}
stream.end = function () {
stream.writable = false
- this.emit('data', plant(data, htmlBuffer))
}
return stream
}
Please sign in to comment.
Something went wrong with that request. Please try again.