You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performance, optimization and readability + minor bug fixes:
* Merge var statements into a comma-separated list on top of blocks
* Add some whitespace for readability (we've got min anyway)
* Removing underscores from variable name (they have no meaning in javascript). They local variables already in their function closure
* Removing 'var' from 'var type' on line 109. 'var type' was already defined in this scope on line 46 (there is no block scope in javascript, just function scope)
* Merging the filter.replace functions into a single line, using the prototype chaining.
* Rebuilding .min.js
* Fixing typo in README
varfiltered=src.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){returneval('('+src+')');}else{thrownewSyntaxError('Error parsing JSON, source is not valid.');}};$.quoteString=function(string){if(string.match(escapeable)){return'"'+string.replace(escapeable,function(a){varc=meta[a];if(typeofc==='string'){returnc;}
0 commit comments