wrap an async function with timeout
async runner please, otherwise the timeout is not meaningful
timeout
timeout threshold in milliseconds, default value is 60 seconds
5.15.0
const f = timeout(async() => {}, 1000)// f() will throw error if the result is not resolved in one second Copy
const f = timeout(async() => {}, 1000)// f() will throw error if the result is not resolved in one second
wrap an async function with timeout