Browse Source

removing module declaration

pull/2/head
Vitor Pamplona 5 years ago
parent
commit
2d12bc8830
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      js/json-beautify.min.js

+ 1
- 1
js/json-beautify.min.js View File

@ -4,5 +4,5 @@
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var gap,indent,rep,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t,n){var r,o,u,p,f,a=gap,i=t[e];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(e)),"function"==typeof rep&&(i=rep.call(t,e,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(p=i.length,r=0;r<p;r+=1)f[r]=str(r,i,n)||"null";return u=0===f.length?"[]":gap?gap.length+f.join(", ").length+4>n?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"[ "+f.join(", ")+" ]":"["+f.join(",")+"]",gap=a,u}if(rep&&"object"==typeof rep)for(p=rep.length,r=0;r<p;r+=1)"string"==typeof rep[r]&&(u=str(o=rep[r],i,n))&&f.push(quote(o)+(gap?": ":":")+u);else for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(u=str(o,i,n))&&f.push(quote(o)+(gap?": ":":")+u);return u=0===f.length?"{}":gap?gap.length+f.join(", ").length+4>n?"{\n"+gap+f.join(",\n"+gap)+"\n"+a+"}":"{ "+f.join(", ")+" }":"{"+f.join(",")+"}",gap=a,u}}function beautify(e,t,n,r){var o;if(gap="",indent="",r||(r=0),"number"!=typeof r)throw new Error("beaufifier: limit must be a number");if("number"==typeof n)for(o=0;o<n;o+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("beautifier: wrong replacer parameter");return str("",{"":e},r)}module.exports=beautify;
var gap,indent,rep,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t,n){var r,o,u,p,f,a=gap,i=t[e];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(e)),"function"==typeof rep&&(i=rep.call(t,e,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(p=i.length,r=0;r<p;r+=1)f[r]=str(r,i,n)||"null";return u=0===f.length?"[]":gap?gap.length+f.join(", ").length+4>n?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"[ "+f.join(", ")+" ]":"["+f.join(",")+"]",gap=a,u}if(rep&&"object"==typeof rep)for(p=rep.length,r=0;r<p;r+=1)"string"==typeof rep[r]&&(u=str(o=rep[r],i,n))&&f.push(quote(o)+(gap?": ":":")+u);else for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(u=str(o,i,n))&&f.push(quote(o)+(gap?": ":":")+u);return u=0===f.length?"{}":gap?gap.length+f.join(", ").length+4>n?"{\n"+gap+f.join(",\n"+gap)+"\n"+a+"}":"{ "+f.join(", ")+" }":"{"+f.join(",")+"}",gap=a,u}}function beautify(e,t,n,r){var o;if(gap="",indent="",r||(r=0),"number"!=typeof r)throw new Error("beaufifier: limit must be a number");if("number"==typeof n)for(o=0;o<n;o+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("beautifier: wrong replacer parameter");return str("",{"":e},r)}
//# sourceMappingURL=/sm/b3cfb7a728aadb18de62f0eea5362c4b2fb91efa8c7fb8f16192c53786f678b4.map

Loading…
Cancel
Save