ansi-highlight

1.0.2 • Public • Published

ansi-highlight

highlight javascript in the terminal

example

var highlight = require('ansi-highlight')
var js = require('fs').readFileSync(__filename, 'utf8')
console.log(highlight(js))

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    4
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i ansi-highlight

Weekly Downloads

4

Version

1.0.2

License

MIT

Last publish

Collaborators

  • nopersonsmodules