diff --git a/JSONCrush.js b/JSONCrush.js index 6f39c02..a38dfbc 100644 --- a/JSONCrush.js +++ b/JSONCrush.js @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////////// -// JSONCrush v1.1.4 by Frank Force - https://github.com/KilledByAPixel/JSONCrush +// JSONCrush v1.1.5 by Frank Force - https://github.com/KilledByAPixel/JSONCrush ///////////////////////////////////////////////////////////////////////////////// 'use strict'; diff --git a/JSONCrush.min.js b/JSONCrush.min.js index e12e04a..2751c8b 100644 --- a/JSONCrush.min.js +++ b/JSONCrush.min.js @@ -1 +1 @@ -'use strict';export default{crush:(a,b=50)=>{var f=[];for(var d=127;--d;)(48<=d&&57>=d||65<=d&&90>=d||97<=d&&122>=d||"-_.!~*'()".includes(String.fromCharCode(d)))&&f.push(String.fromCharCode(d));for(d=32;255>d;++d){var h=String.fromCharCode(d);"\\"==h||f.includes(h)||f.unshift(h)}a=a.replace(/\u0001/g,"");a=q(a);d=f.length;h="";var c={};for(var g=2;g=m||55296<=n&&56319>=n)){m=1;for(n=a.indexOf(e,k+g);0<=n;++m)n=a.indexOf(e,n+g);1d)break;b=f[d];var l=void 0;g=0;k=encodeURI(encodeURIComponent(b)).replace(/%../g,"i").length;for(var p in c)e=c[p],e=(e-1)*encodeURI(encodeURIComponent(p)).replace(/%../g,"i").length-(e+1)*k,h.length||(e-=encodeURI(encodeURIComponent("\u0001")).replace(/%../g,"i").length),0>=e?delete c[p]:e>g&&(l=p,g=e);if(!l)break;a=a.split(l).join(b)+b+l;h=b+h;g={};for(var p in c){c=p.split(l).join(b);k=0;for(e=a.indexOf(c);0<=e;++k)e=a.indexOf(c,e+c.length);1{a=a.substring(0,a.length-1);var b=a.split("\u0001");a=b[0];if(1{var f=[['"',"'"],["':","!"],[",'","~"],["}",")","\\","\\"],["{","(","\\","\\"]],d=(h,c)=>h.replace(new RegExp(`${(c[2]?c[2]:"")+c[0]}|${(c[3]?c[3]:"")+c[1]}`,"g"),g=>g===c[0]?c[1]:c[0]);if(b)for(b=0;b{var f=[];for(var d=127;--d;)(48<=d&&57>=d||65<=d&&90>=d||97<=d&&122>=d||"-_.!~*'()".includes(String.fromCharCode(d)))&&f.push(String.fromCharCode(d));for(d=32;255>d;++d){var h=String.fromCharCode(d);"\\"==h||f.includes(h)||f.unshift(h)}a=a.replace(/\u0001/g,"");a=q(a);d=f.length;h="";var c={};for(var g=2;g=m||55296<=n&&56319>=n)){m=1;for(n=a.indexOf(e,k+g);0<=n;++m)n=a.indexOf(e,n+g);1d)break;b=f[d];var l=void 0;g=0;k=encodeURI(encodeURIComponent(b)).replace(/%../g,"i").length;for(var p in c)e=c[p],e=(e-1)*encodeURI(encodeURIComponent(p)).replace(/%../g,"i").length-(e+1)*k,h.length||(e-=encodeURI(encodeURIComponent("\u0001")).replace(/%../g,"i").length),0>=e?delete c[p]:e>g&&(l=p,g=e);if(!l)break;a=a.split(l).join(b)+b+l;h=b+h;g={};for(var p in c){c=p.split(l).join(b);k=0;for(e=a.indexOf(c);0<=e;++k)e=a.indexOf(c,e+c.length);1{a=a.substring(0,a.length-1);var b=a.split("\u0001");a=b[0];if(1{var f=[['"',"'"],["':","!"],[",'","~"],["}",")","\\","\\"],["{","(","\\","\\"]],d=(h,c)=>h.replace(new RegExp(`${(c[2]?c[2]:"")+c[0]}|${(c[3]?c[3]:"")+c[1]}`,"g"),g=>g===c[0]?c[1]:c[0]);if(b)for(b=0;b