highlight-string.js 262 B

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