Skip to content

Commit

Permalink
Removed once wrapper on end event
Browse files Browse the repository at this point in the history
  • Loading branch information
floatdrop committed Sep 15, 2014
1 parent 4b20e4e commit e553b2b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions assertStream.js
Expand Up @@ -20,18 +20,6 @@ function assertStream(options, transform, flush) {
});
});

var onceEnd;
var _emit = stream.emit;
stream.emit = function (event, error) {
if (event === 'end') {
if (onceEnd) { return; }
_emit.call(stream, 'end', error);
onceEnd = true;
} else {
_emit.apply(stream, arguments);
}
};

stream.assertion = function (message) {
this.emit('assertion', new Error(message));
};
Expand Down

0 comments on commit e553b2b

Please sign in to comment.