Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

safe-string.js 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. var colors = require('../safe');
  2. console.log(colors.yellow('First some yellow text'));
  3. console.log(colors.yellow.underline('Underline that text'));
  4. console.log(colors.red.bold('Make it bold and red'));
  5. console.log(colors.rainbow('Double Raindows All Day Long'));
  6. console.log(colors.trap('Drop the bass'));
  7. console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS')));
  8. // styles not widely supported
  9. console.log(colors.bold.italic.underline.red('Chains are also cool.'));
  10. // styles not widely supported
  11. console.log(colors.green('So ') + colors.underline('are') + ' '
  12. + colors.inverse('inverse') + colors.yellow.bold(' styles! '));
  13. console.log(colors.zebra('Zebras are so fun!'));
  14. console.log('This is ' + colors.strikethrough('not') + ' fun.');
  15. console.log(colors.black.bgWhite('Background color attack!'));
  16. console.log(colors.random('Use random styles on everything!'));
  17. console.log(colors.america('America, Heck Yeah!'));
  18. console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!'));
  19. console.log('Setting themes is useful');
  20. //
  21. // Custom themes
  22. //
  23. // console.log('Generic logging theme as JSON'.green.bold.underline);
  24. // Load theme with JSON literal
  25. colors.setTheme({
  26. silly: 'rainbow',
  27. input: 'blue',
  28. verbose: 'cyan',
  29. prompt: 'grey',
  30. info: 'green',
  31. data: 'grey',
  32. help: 'cyan',
  33. warn: 'yellow',
  34. debug: 'blue',
  35. error: 'red',
  36. });
  37. // outputs red text
  38. console.log(colors.error('this is an error'));
  39. // outputs yellow text
  40. console.log(colors.warn('this is a warning'));
  41. // outputs blue text
  42. console.log(colors.input('this is an input'));
  43. // console.log('Generic logging theme as file'.green.bold.underline);
  44. // Load a theme from file
  45. colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
  46. // outputs red text
  47. console.log(colors.error('this is an error'));
  48. // outputs yellow text
  49. console.log(colors.warn('this is a warning'));
  50. // outputs grey text
  51. console.log(colors.input('this is an input'));
  52. // console.log(colors.zalgo("Don't summon him"))