Is there a way to check what is next middleware function in call stack in express application?
I've tried to check by comparing next function with the reference to function i surely know will be called next.
public static async requestMapper(request: Request, response: Response, next: Function){
console.log(next == ExampleController.exampleHandler)
next();
}
Even though I indeed know that ExampleController.exampleHandler is called next, output of this snippet is false