1

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?

carl
  • 4,216
  • 9
  • 55
  • 103

2 Answers2

2

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.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
0

I just found

https://beautifier.io/

which solved my problem... sublime should provide such a tool

carl
  • 4,216
  • 9
  • 55
  • 103