1.0.0 • Published 5 years ago
wrap-async v1.0.0
wrap-async
Wraps an async function so it can called synchronously
Usage:
Import:
const wrap = require('wrap-async')
Express controller:
exports.getRequest = wrap(async function (req, res) {
res.status(200)
})
Immediate invocation:
wrap(async function() {
return await http()
})()
1.0.0
5 years ago