gfx / universal-zopfli-js

JavaScript binding to Zopfli with WebAssembly.
https://www.npmjs.com/package/@gfx/zopfli
Other
81 stars 3 forks source link

Add Promise support #9

Closed ai closed 5 years ago

ai commented 5 years ago

node-zopfli returns Promise on missed callback, so to be compatible with its API we need to do the same

https://github.com/pierreinglebert/node-zopfli#api

gfx commented 5 years ago

There are already *Async() versions that returns promises, e.g. gzipAsync(), zlibAsync(), and deflateAsync().