jsmin-php
jsmin-php copied to clipboard
Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.
Hi! The BOM handling should take into account the different encoding types indicated by the BOM. Just removing the BOM only works for the most common way. The hungarian translation...
Trying to minify this extract of real-world 3rd party JS `x=navigator.vendor,S=navigator.userAgent,C=y(e=>/Edge\/|Edg\//.test(e||S)),le=y(e=>/Firefox/.test(e||S)),ue=y(e=>/Trident|MSIE/.test(e||S)),w=y(e=>/Opera|OPR/.test(e||S)),de=y((e,t)=>(/Chrom/.test(e||S)&&/Google/.test(t||x)||/CriOS/.test(e||S))&&!C(e)&&!w(e)),fe=y(e=>/Chrom|Applechromium/.test(e||S)),pe=y((e,t)=>/Safari/.test(e||S)&&/Apple Computer/.test(t||x)&&!C(e)&&!w(e)),me=y(()=>/WebKit/.test(S)),he=e=>{let t=e.indexOf(`Version/`); nextline="hi";` results in `x=navigator.vendor,S=navigator.userAgent,C=y(e=>/Edge\/|Edg\ nextline="hi"` due to the regex not being properly detected. in [JSMin.php](https://github.com/mrclay/jsmin-php/blob/master/src/JSMin/JSMin.php#L281-L284) changing the...
Hello! I got an interesting error when trying to compress the following js code snippet: ```js opt.t = opt.tstart * (1 - i++/(times -1)); ``` Exception: UnterminatedRegExpException JSMin: Unterminated RegExp...