3 ms·
How is it different from jsbeautifier[1] other than enforcing its own style rules? [1] https://github.com/beautify-web/js-beautify https://github.com/beautify-
by balajics 10y ago
How is it different from jsbeautifier[1] other than enforcing its own style rules?
[1] https://github.com/beautify-web/js-beautify https://github.com/beautify-web/js-beautify
- Noseshine 10y agoLooking at both github repos, jsbeautifier looks more complicated (as a project), and I don't think it uses the AST or at least I did not see anything that looked like it would create one. Looking at some of the code I saw `string.replace(...)` so it seems to be string-manipulation. It also is for HTML and CSS too it seems, while the project discussed here is just JS, so more targeted, and the approach to go through the AST seems intriguing to me. PS: This seems to be the code for the JS beautifier in jsbeautifier: https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js https://github.com/beautify-web/js-beautify/blob/master/js/l...