Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function handleData(msgData) {
switch (msgData.type) {
case 'COMPRESS':
return LZString.compress(msgData.strToHandle);
case 'DECOMPRESS':
return LZString.decompress(msgData.strToHandle);
case 'COMPRESS_UTF16':
// tslint:disable-next-line
return LZString['compressToUTF16'](msgData.strToHandle);
case 'DECOMPRESS_UTF16':
// tslint:disable-next-line
return LZString['decompressFromUTF16'](msgData.strToHandle);
}
}