---
id: 2336
title: UglifyJS — a JavaScript parser/compressor/beautifier
slug: uglifyjs-a-javascript-parsercompressorbeautifier-2
date: '2012-04-25T05:17:29Z'
modified: '2012-04-25T05:17:29Z'
status: publish
type: post
author: pmoelgaard
categories:
  - Uncategorized
tags:
  - Java
  - JavaScript
excerpt: null
canonicalPath: /posts/uglifyjs-a-javascript-parsercompressorbeautifier-2
featuredImage: null
commentCount: 0
wordCount: 105
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/uglifyjs-a-javascript-parsercompressorbeautifier-2
---
Introducing UglifyJS... a package that implements a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on [NodeJS](http://nodejs.org/), but it should work on any JavaScript platform supporting the CommonJS module system (and if the platform of choice doesn’t support CommonJS, its easy to implement it, or discard the `exports.*`lines from UglifyJS sources).

The tokenizer/parser generates an abstract syntax tree from JS code. its then possible to traverse the AST to learn more about the code, or do various manipulations on it. This part is implemented in [parse-js.js](https://github.com/lib/parse-js.js) and it’s a port to JavaScript of the excellent [parse-js](http://marijn.haverbeke.nl/parse-js/) Common Lisp library from [Marijn Haverbeke](http://marijn.haverbeke.nl/).

Check it out...[  
https://github.com/mishoo/UglifyJS](https://github.com/mishoo/UglifyJS)
