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