var colors = require('colors'); console.log('hello'.green); // outputs green text console.log('i like cake and pies'.underline.red) // outputs red underlined text console.log('inverse the color'.inverse); // inverses the color console.log('OMG Rainbows!'.rainbow); // rainbow console.log('Run the trap'.trap); // Drops the bass
// automatically pick platform const say = require('say')
// or, override the platform constSay = require('say').Say const say = newSay('darwin' || 'win32' || 'linux')
// Use default system voice and speed say.speak('Hello!')
// Stop the text currently being spoken say.stop()
// More complex example (with an OS X voice) and slow speed say.speak("What's up, dog?", 'Alex', 0.5)
// Fire a callback once the text has completed being spoken say.speak("What's up, dog?", 'Good News', 1.0, (err) => { if (err) { returnconsole.error(err) }
console.log('Text has been spoken.') });
// Export spoken audio to a WAV file say.export("I'm sorry, Dave.", 'Cellos', 0.75, 'hal.wav', (err) => { if (err) { returnconsole.error(err) }
// options is optional glob("**/*.js", options, function (er, files) { // files is an array of filenames. // If the `nonull` option is set, and nothing // was found, then files is ["**/*.js"] // er is an error object or null. })