JavaScript community news log


Daily JavaScript community news and chat

A RubyFlow-inspired community news site for JavaScript and related technologies.

Anyone can post news to be seen by the community (and maybe selected for JavaScript Weekly!)

Transforming callbacks into promises and back again with function decorators

Every day that I work in JavaScript-land, I stumble across a mixture of callbacks, promises or async/await. I have my own preferences in how I like to handle async code, though sometimes I don’t have a choice because an external library like fs, serverless, aws-sdk, etc. is using something else. With function decorators you can easily transform those callbacks into promises and back again.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in