Javascript formatter and compressor

Source: Internet
Author: User

Javascript format and colour (also ref to JavaScript compressor)
Ref: http://javascript.about.com/library/blformat.htm
This is my favorite formatter. I think the formatter is the best, and it is implemented using Js.

Note: I changed the formatter to a clean version without advertisement and put it in googlepage. You can directly access it through the following link:
Http://harrywu304.googlepages.com/jsformatter.htm


JavaScript code Improver
Ref: http://www.jcay.com/javascript-code-improver.html
This is also a good formatter, which is very fast and useful for those huge-level Js. It is also free of charge.
Unfortunately, local installation is required, and only Windows is required.


Simple JavaScript formatter
Ref: http://blog.djh5e.org/wp-content/jsf.html
This can be said to be the simplest formatter and JS implementation. The principle is to regard the JS Code to be formatted as the content of a function, construct a new function, and then perform the function. tostring ():

VaR initjs = "....";
Eval ("Var tmpf = function () {" + initjs + "}");
VaR ftjs = tmpf. tostring ();
Ftjs = ftjs. substring (ftjs. indexof ("{") + 1, ftjs. lastindexof ("}"));

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.