Convert object into a thenable
Useful when we want to imply an asynchronous representation onto some non-promise object.
Having that target object can be combined into promise chains or async/await syntax. One use case would be turning a stream instance so it's also a promise.
npm install 2-thenable
How it works
target is object to be extended with
promise is expected to be a native promise instance that reflects resolution which should be mapped onto
Example of converting stream to thenable
const toThenable = ;// Example of converting a simple utf8 string stream to thenable