GithubHelp home page GithubHelp logo

bom-d-van / js-beautify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beautify-web/js-beautify

1.0 1.0 0.0 1.08 MB

Beautifier for javascript

Home Page: http://jsbeautifier.org/

License: MIT License

js-beautify's Introduction

JS Beautifier

...or, more specifically, all of the code powering jsbeautifier.org.

This little beautifier will reformat and reindent bookmarklets, ugly JavaScript, unpack scripts packed by Dean Edward’s popular packer, as well as deobfuscate scripts processed by javascriptobfuscator.com.

To beautify from the command-line you can use provided python script/library.

./js-beautify file.js beautifies a file, output goes to stdout.

To use jsbeautifier as a library is simple:

import jsbeautifier
res = jsbeautifier.beautify('your javascript string')
res = jsbeautifier.beautify_file('some_file.js')

...or, to specify some options:

opts = jsbeautifier.default_options()
opts.indent_size = 2
res = jsbeautifier.beautify('some javascript', opts)

You are free to use this in any way you want, in case you find this useful or working for you.

Written by Einar Lielmanis, [email protected] Python version flourished by Stefano Sanfilippo [email protected]

Thanks to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, Dave Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull, Mathias Bynens and others.

js-beautify's People

Contributors

ariya avatar artwist avatar bjansen avatar courts avatar einars avatar ejaesler avatar esseks avatar fitzgen avatar gimmi avatar helheim avatar infocatcher avatar jessthrysoee avatar laacz avatar mathiasbynens avatar nightwing avatar nsossonko avatar rcopera avatar senica avatar tilla avatar tylerrick avatar yacomink avatar zhizhangchen avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.