erik-express-utils

1.0.3 • Public • Published

function error(status: number, message: string): IHttpError { throw({status, message: {message}}); }

function wrapAsync(fn: Function) { return function(req: Request, res: Response, next: NextFunction) { fn(req, res, next).catch(next); }; }

function all (...promises: Promise[]): Promise<any[]> { return Promise.all(promises); }

Package Sidebar

Install

npm i erik-express-utils

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

1.65 kB

Total Files

3

Last publish

Collaborators

  • eriksie