A helper to try an async function without forking the control flow. Returns an error first callback like array response as [Error, result]
const [err, user] = await tryit(api.users.find)(userId) Copy
const [err, user] = await tryit(api.users.find)(userId)
Description
A helper to try an async function without forking the control flow. Returns an error first callback like array response as [Error, result]
Example