Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return queue.add(() => {
if (isCanceled) {
return Promise.reject(new CancelError())
}
job = request(options)
if (options.timeout) {
job = timeout(job, options.timeout)
}
return job
})
})