ansi-highlight
highlight javascript in the terminal
example
var highlight =var js =console
see also
ansi-highlight uses regular expressions to tokenize javascript. this is very fast and simple, but is incorrect is a few weird edgecases. If need something to be completely correct, use cardinal which uses esprima to parse the javascript.
License
MIT