Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new Promise((resolve, reject) => {
const options = { outputEncoding, useWebWorker: false };
compressAsync(input, options, (output, err) => {
if (!err) resolve(output);
else reject(err);
});
}),
/**
return new Promise((resolve, reject) => {
let options = {
outputEncoding: 'StorageBinaryString'
};
let callback = function (data, error) {
if (error) {
reject(error);
}
resolve(data);
};
lzutf8.compressAsync(string, options, callback);
});
};