snappy
snappy copied to clipboard
as async api, Promise catch should catch all the exception
const { compress } = require('snappy')
try {
compress(this.nothing).catch((e) => {
console.log('excpetion should be here:', e)
})
} catch (e) {
console.log('unexpect excpetion:', e)
}
test on [email protected]