Tutorial on creating a pretty printer in JavaScript
github.com