2016-03-17 16:12:52 -04:00
2015-07-07 12:32:03 -07:00
2016-03-17 15:36:11 -04:00
2015-07-07 12:32:03 -07:00
2016-03-17 16:12:52 -04:00
2015-07-07 13:13:07 -07:00

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()
S
Description
A decorator for async functions that automatically calls done() on the returned promise
Readme MIT
29 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 100%