You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constchalk=require('@fibjs/chalk');constos=require('os');// sample 1(()=>{constmiles=18;constcalculateFeet=miles=>miles*5280;console.log(chalk`There are {bold 5280 feet} in a mile.In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.`);})();// sample 2(()=>{constram={total: os.totalmem(),free: os.freemem(),getused(){returnthis.total-this.free}}// ES2015 template literalconsole.log(`CPU: ${chalk.red('90%')}RAM: ${chalk.green('40%')}DISK: ${chalk.yellow('70%')}`);// ES2015 tagged template literalconsole.log(chalk`RAM: {green ${ram.used/ram.total*100}%}`);// Use RGB colors in terminal emulators that support it.console.log(chalk.keyword('orange')('Yay for orange colored text!'));console.log(chalk.rgb(123,45,67).underline('Underlined reddish color'));console.log(chalk.hex('#DEADED').bold('Bold gray!'));})();
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: