Hi All, is there any native library to unzip a fol...
# general
s
Hi All, is there any native library to unzip a folder using suitescript. As of now i found none of them can unzip a folder. If anyone knows any alternate method kindly suggest.
s
Thanks @battk
@battk Hi i tried jsZip still unable to unzip it. Sorry but could you please put some light on the approach you used to unzip the folder. I'm new to ss and it would be very helpful.
b
this would not be something you want to approach with no javascript knowledge
the easiest would be to not do the unzipping in suitescript
do it somewhere else and then send the unzipped result back to netsuite
s
Actually you suggested polyfill thats new to me. What i was doing is imported lib as custom module then trying it as we usually do with select2 or moment js etc.
b
jsZip uses setImmediate, it tries and fails to polyfill itself using setTimeout, which also doesnt exist in suitescript
javascript modules are usually written to run in the browser or in node, and suitescript is neither
in this case you have to implement setImmediate yourself
and then make it a global function so that jsZip can use it
s
Thank you @battk