Intercepts ServerResponse methods so you can apply filters
Node-intercept overrides the ServerRequest.write and ServerRequest.end functions in node and provides you with a layered approach to filtering. Just pass in an array of functions and they will be called in order.
This module is meant to make compression easier. Just pass in a function, compress the chunk, and pass on the data through the callback.
Remember, "with great power comes great responsibility". I beg of you, please use this module to make your code cleaner and not to do hack something unnatural. Then again, this code is open source, so I suppose there is nothing I can do.
Uses the forEachAsync in futures. See the main page of futures for more information:
npm install futures
So far, there are only two methods that are overridden. The intercept function takes one parameter, an options object, in which you can specify functions to be called when the ServerResponse.write and ServerResponse.end methods are called. Here are basic usage instructions:
The source is pretty simple and pretty straightforward.
This is where the module lives. There is only one parameter, an options object. Possible properties are: