gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.4k stars 510 forks source link

[Compatibility issues] parameter initialization #429

Closed nenge123 closed 1 year ago

nenge123 commented 1 year ago
class  {
    constructor(options={}){ ...}
}

Some packaged OEM browsers do not support. like "Tencent QQ mobile browser","WeChat browser"

class  {
    constructor(options){options=options||{}; ...}
}
gildas-lormeau commented 1 year ago

This feature has been introduced 8 years ago in ES2015. You should use babel to build your project. I am sorry but I have no intention of making the library compatible in such old environments.

gildas-lormeau commented 1 year ago

BTW, I already provide a script to compile zip.js with babel for older runtimes. You just have to clone the project and follow the instructions in the comments here: https://github.com/gildas-lormeau/zip.js/blob/master/rollup-es5.config.js