cli-color/examples/throbber.js
raw| 1 | "use strict"; |
| 2 | |
| 3 | var setupThrobber = require("../throbber"); |
| 4 | |
| 5 | var throbber = setupThrobber(function (str) { process.stdout.write(str); }, 200); |
| 6 | |
| 7 | process.stdout.write("Throbbing for 3 seconds here -> "); |
| 8 | throbber.start(); |
| 9 | |
| 10 | setTimeout(function () { |
| 11 | console.log(); |
| 12 | throbber.stop(); |
| 13 | }, 3000); |