1.1.1 • Published 8 years ago

autodone v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

autodone

A decorator for async functions that automatically calls done() on the returned promise

Usage

Decorate any function that returns a promise, including async functions:

@autodone
async componentDidMount() {
  ...
}

Important Notes

  • Use this decorator only when you never will use the promise returned from the async function. Once a promise has been marked as done, you cannot call any more methods on it.
  • Your promise library must implement done()