Is there a way to automatically reformat javascript code with sublime? E.g. if I get code like this
https://checkout.stripe.com/checkout.js
How can I copy this into sublime and automatically make it readable?
Is there a way to automatically reformat javascript code with sublime? E.g. if I get code like this
https://checkout.stripe.com/checkout.js
How can I copy this into sublime and automatically make it readable?
There are several Javascript formatters available in Package Control. For un-minifying JS, I either use HTML-CSS-JS Prettify
or JsFormat
, or both. Please note that HTML-CSS-JS Prettify requires Node.js on your system, while JsFormat is a standalone program. JsFormat is the suggested replacement for the tool you found at https://beautifier.io, which uses js-beautify
- see here.