Marak/colors.js — pull request #34 by danielbeardsley (2012-11-01 06:21:00+00:00)
Title: Add 'auto' mode that only adds colors for the terminal

If the mode is set to 'auto', then escaping will only happen if stdout is a TTY
(terminal). If stdout is redirected somewhere, strings will not be modified by
the colorize functions.