codemodsquad / asyncify

Don't keep your promises 😉
MIT License
13 stars 6 forks source link

better option to not convert short chains to IIAAFs #14

Closed jedwards1211 closed 4 years ago

jedwards1211 commented 4 years ago

Cases like

const promises = Promise.all([
  user.update().then(() => user.reload()),
  post.update().then(() => post.reload()),
])

Would be better left alone since they become messy when converted to IIAAFs

papb commented 4 years ago

What's an IIAAF? :thinking:

jedwards1211 commented 4 years ago

Immediately invoked async arrow function 😅 (async () => ...)()

jedwards1211 commented 4 years ago

I forgot, this is more or less fixed, it no longer converts chains of length 2 or less where the handlers are arrow function expressions