0

I am new to .js and want to change this arrow function to normal function, for personal interest

module.exports.endpoint = fn =>
(req, res) => {
    Promise.resolve(fn(req, res))
        .catch((err) => {
            this.jsonOutHandler(err, null, res);
        });
};

How to achieve it?

Hrant Nurijanyan
  • 629
  • 1
  • 8
  • 18

0 Answers0