A utility for creating promises that can be externally resolved or rejected.
yarn add @alwatr/flatomise
import {newFlatomise} from '@alwatr/flatomise';
const flatomise = newFlatomise();
flatomise.promise.then(() => {
console.log('flatomise resolved');
});
flatomise.resolve();
For real usage, see async-queue.