Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added proxied property to prevent proxying the method multiple times

  • Loading branch information...
commit 5b8248cd32c100d559b940d8ce6684dabaa582e4 1 parent 5045766
@mikefrey authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  index.js
  2. +1 −1  package.json
View
2  index.js
@@ -10,10 +10,12 @@
module.exports = responseEnd
function responseEnd(res) {
+ if (res.end.proxied) return
var old = res.end
res.end = function() {
res.end = old
res.end.apply(res, arguments)
res.emit('end')
}
+ res.end.proxied = true
}
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "response-end",
"description": "Adds an end event to the given response object",
- "version": "0.0.1",
+ "version": "0.0.2",
"author": "Mike Frey <frey.mike@gmail.com>",
"keywords": ["response", "end", "event", "http"],
"dependencies": {},
Please sign in to comment.
Something went wrong with that request. Please try again.