JavaScript Shaper

Shaper is an extensible framework for JavaScript syntax tree
shaping, created by Olov Lassus.
Follow me on
Twitter.

Shaper manipulates the syntax tree representation of your JS
source code, and then turns it back into source code again. It
goes very far to keep all your source code formatting, indentation,
whitespace and comments intact.

Discuss in
the JSShaper Google group. Source code available
(MIT
license) at
GitHub. Check out the
README
for more info. Clone it and use it or hack it and create your own
plugins! All of Shaper is written in JavaScript so you'll start
adding to it in no time. Shaper
is ES5
strict mode and
restrict mode clean, and will
stay that way.