How to use the underline function from chalk

Find comprehensive JavaScript chalk.underline code examples handpicked from public code repositorys.

57
58
59
60
61
62
63
64
65
66

// Pass in multiple arguments
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));

// Nest styles
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));

// Nest styles of the same type even (color, underline, background)
log(chalk.green(
        'I am a green line ' +
fork icon837
star icon2
watch icon4

+ 3 other calls in file

22
23
24
25
26
27
28
29
30
31

this.neat = neatLog(this.renderApp.bind(this), {
  fullscreen: true,
  style: function (start, cursor, end) {
    if (!cursor) cursor = ' '
    return start + chalk.underline(cursor) + end
  }
}
)
this.neat.input.on('update', () => {
fork icon47
star icon520
watch icon33

98
99
100
101
102
103
104
105
106
107
    // it here because we always show at most one error, and
    // we can only be sure it's an ESLint error before exiting
    // this function.
    output +=
        "Search for the " +
        chalk.underline(chalk.red("keywords")) +
        " to learn more about each error.";
}

return output;
fork icon38
star icon53
watch icon0

193
194
195
196
197
198
199
200
201
202
console.log(messages.warnings.join("\n\n"));

// Teach some ESLint tricks.
console.log(
    "\nSearch for the " +
        chalk.underline(chalk.yellow("keywords")) +
        " to learn more about each warning."
);
console.log(
    "To ignore, add " +
fork icon38
star icon53
watch icon0

22
23
24
25
26
27
28
29
30
31
  )
);

console.log(
  redBright(
    underline(
      `${client.user.username} is now online! v${GBFVersion.Version}`
    )
  )
);
fork icon3
star icon10
watch icon0

18
19
20
21
22
23
24
25
26
27
28
29
const { getLastItem } = require('../array')
const { TYPE } = require('../builder')
const is = require('../is')


function _timeDiff(ms) {
  return chalk.underline(`${Date.now() - ms}ms`)
}


module.exports = {
  /** @type {mysql2} */
fork icon1
star icon3
watch icon0

70
71
72
73
74
75
76
77
78
79
if (warnings.length) {
  console.log(chalk.yellow('Compiled with warnings.\n'));
  console.log(warnings.join('\n\n'));
  console.log(
    '\nSearch for the ' +
      chalk.underline(chalk.yellow('keywords')) +
      ' to learn more about each warning.'
  );
  console.log(
    'To ignore, add ' +
fork icon1
star icon1
watch icon0

24
25
26
27
28
29
30
31
32
33
 
// pass in multiple arguments 
// process.stdout.write(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
 
// nest styles 
// process.stdout.write(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
 
// nest styles of the same type even (color, underline, background) 
// process.stdout.write(chalk.green(
//     'I am a green line ' +
fork icon0
star icon0
watch icon0

18
19
20
21
22
23
24
25
26
27
})

tableData.unshift([
  underline('Ext'),
  underline('Filename'),
  underline('Size'),
  underline('Gzipped')
])

const output = table(tableData, {
fork icon0
star icon0
watch icon472

+ 15 other calls in file