image2text

Untitled

Sep 3rd, 2019
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. function fetchWitchTimeout({ timeout, ...fetchOptions }) {
  2. return Promise.race([
  3. fetch(...fetchOptions),
  4. new Promise((_, reject) =>
  5. setTimeout(() => {
  6. reject(Error('Timedout'))
  7. }, timeout)
  8. )
  9. I
  10. ¥
Advertisement
Add Comment
Please, Sign In to add comment