highlight-string.js 265 B

123456789101112131415
  1. // This file will highlight the passed code using the custom theme when run via: "node highlight-string"
  2. 'use strict'
  3. var cardinal = require('..')
  4. var code = '' +
  5. function add(a, b) {
  6. var sum = a + b
  7. return sum
  8. } +
  9. ''
  10. console.log(cardinal.highlight(code))