Skip to content

is this tool a replcaement of asyncWrapper ? #49

@issam-seghir

Description

@issam-seghir

is this tool a replacement of this :

function asyncWrapper(fn) {
	return function (req, res, next) {
		fn(req, res, next).catch(next);
	};
}


  app.get('/route', asyncWrapper(async (req, res, next) => {
  const data = await someAsyncOperation();
  res.json(data);
  }));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions