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.

50 lines
1.0KB

  1. /*
  2. Example
  3. */
  4. var figlet = require('../../lib/node-figlet.js');
  5. /*
  6. Once this has been run:
  7. npm install figlet
  8. Use the below line instead of the above line
  9. */
  10. // var figlet = require('figlet');
  11. figlet('Hello World!', 'Standard', function(err, data) {
  12. if (err) {
  13. console.log('Something went wrong...');
  14. console.dir(err);
  15. return;
  16. }
  17. console.log(data);
  18. figlet.text('Again, Hello World!', 'Graffiti', function(err, data) {
  19. if (err) {
  20. console.log('Something went wrong...');
  21. console.dir(err);
  22. return;
  23. }
  24. console.log(data);
  25. figlet.text('Last time...', {
  26. font: 'Standard',
  27. horizontalLayout: 'full',
  28. verticalLayout: 'full'
  29. }, function(err, data) {
  30. if (err) {
  31. console.log('Something went wrong...');
  32. console.dir(err);
  33. return;
  34. }
  35. console.log(data);
  36. });
  37. });
  38. });