express
express copied to clipboard
Provision to pass json replacer with a set of options.
app.set('json replacer', { fn: function(key, value, {req, res}) { ...}, reqRes: true }); This is another way. One of the options is reqRes : true. In this case, the replacer function is called with req and res objects, which can be used to customise the replacement process according to the request.
Please consider now. Fixed
Updated the test case , fixed bug.