davidbanham / express-async-errors

async/await support for ExpressJS
Other
900 stars 43 forks source link

Keep Reference on originalHandle #31

Closed Uzlopak closed 2 years ago

Uzlopak commented 4 years ago

I needed to keep the original handle, so I extended your code in my fork like this:

    Object.defineProperty(newFn, 'originalHandle', {
        value: fn,
        writable: false,
    });
davidbanham commented 4 years ago

Cool, thanks for getting in touch. Is this something you're proposing as an additional feature or just an FYI?

Uzlopak commented 4 years ago

I didnt know if you think it is useful for you or not. If you think this is useful, I would say, that you should add it :).