MCPcopy
hub / github.com/socketio/socket.io-client-java / before

Function before

src/test/resources/server.js:119–125  ·  view source on GitHub ↗
(context, name, fn)

Source from the content-addressed store, hash-verified

117
118
119function before(context, name, fn) {
120 var method = context[name];
121 context[name] = function() {
122 fn.apply(this, arguments);
123 return method.apply(this, arguments);
124 };
125}
126
127before(io.engine, 'handleRequest', function(req, res) {
128 // echo a header value

Callers 1

server.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected