Open Richienb opened 4 years ago
@Richienb just wrap it:
const readImage = require ("readimage")
const read = buffer => new Promise ((resolve, reject) => {
readImage (buffer, (err, image) => {
if (err) reject (err)
resolve (image)
})
}
👆 Now readimage support promises.
Not looking for a quick workaround.
Personally, I would hate Promises as the only API for readimage
since I loath error handling with nested Promises.
But I already created a fork, so my opinion is not important.
It would be useful if this library supported promises.