Gefer
Deferred promises and generators.
Why deferred promises and generators?
Don't. This is bad practice. If at all possible, you should produce promises and generators with well-defined scopes, and no side effects. However, if you find yourself in a bind with no other options, at least keep it clean.
Usage:
Deferred Promise
const defer = const deferred = deferredpromise deferred // or deferred.reject(new Error('Foo Bar'))
Deferred Generators
const mySubject = mySubjectnext'Hello' const printAll = async { for await let v of console } mySubjectnext'World' // or mySubject.error(new Error('Foo Bar'))
Use a custom promise library
const Promise = const gefer = geferPromise = Promise