UNPKG
vanta-api
Version:
latest (1.2.4)
1.2.4
1.2.2
1.2.1
1.2.0
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Advanced API features and security configuration for Node.js/MongoDB.
vanta-api
/
src
/
catchAsync.js
6 lines
•
135 B
JavaScript
View Raw
1
2
3
4
5
6
export
const
catchAsync
=fn=>{
return
(
req,res,next
)=>
{
fn
(req,res,next).
catch
(next) } }
export
default
catchAsync