| 86 | |
| 87 | buildCompressInfo(original, minified) { |
| 88 | let commify = str => String(str).split('').reverse().join('').replace(/(...)(?!$)/g, '$1,').split('').reverse().join(''); |
| 89 | let diff = original.length - minified.length; |
| 90 | let savings = original.length ? (100 * diff / minified.length).toFixed(2) : 0; |
| 91 | this.compressInfo = '压缩前: <strong>' + commify(original.length) + '</strong>' + |