title: How does npm draw the dependency tree?
body: <p>npm does a nifty job of drawing a package's dependency hierarchy as a tree in the console:</p>
  
  <pre><code>$ npm ls
  my-awesome-project@0.0.1
  ├── colors@0.6.0-1
  ├─┬ express@2.5.11
  │ ├─┬ connect@1.9.2
  │ │ └── formidable@1.0.11
  │ ├── mime@1.2.4
  │ ├── mkdirp@0.3.0
  │ └── qs@0.4.2
  └── uglify-js@1.2.6
  </code></pre>
  
  <p>How does npm do this?</p>