How to use the grey function from chalk

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

8
9
10
11
12
13
14
15
16

const zip = require('./lib/zip')

const BAR_OPTS = {
  format: chalk.cyan('{bar}') +
    chalk.grey(' | {percentage}% | {received}/{size}'),
  barCompleteChar: '\u2588',
  barIncompleteChar: '\u2591',
}
fork icon157
star icon850
watch icon35

+ 3 other calls in file

57
58
59
60
61
62
63
64
}

const logExtraData = (extraData, labels) => {
  for (const key in extraData) {
    const id = extraData[key]
    console.log(bgMagenta(key), labels[id], grey(id))
  }
}
fork icon22
star icon198
watch icon13

+ 3 other calls in file

5
6
7
8
9
10
11
12
13
14
    string:     chalk.green,
    punctuator: chalk.grey,
    keyword:    chalk.cyan,
    number:     chalk.magenta,
    regex:      chalk.magenta,
    comment:    chalk.grey.bold,
    invalid:    chalk.inverse
},

codeFrame: asIs,
fork icon11
star icon156
watch icon8

124
125
126
127
128
129
130
131
132
      let key = Object.keys(a)[0];
      return `- ${key} (--${option.name}=${a[key]}`;
    }
  }).join(', ');

  aliases = chalk.grey(`aliases: ${aliases}`);

  output = `${output}${EOL}     ${aliases}`;
}
fork icon3
star icon54
watch icon8

+ 19 other calls in file

5
6
7
8
9
10
11
12
13
  this.enabled = chalk.enabled;
  this.scope = scope || '';
};

var logger = function(log, scope) {
  var time = chalk.grey('[') + timestamp('HH:mm:ss') + chalk.grey('] ');
  var scope = scope ? chalk.grey('[') + chalk.bold(scope) + chalk.grey('] ') : '';
  console.log(time + scope + log);
};
fork icon1
star icon2
watch icon2

+ 11 other calls in file

36
37
38
39
40
41
42
43
44
45
    return child.status === 0
      ? chalk.green(String(child.output[1]).trim())
      : chalk.grey('Not installed')
  }
  catch (err) {
    return chalk.grey('Not installed')
  }
}

function safePkgInfo (pkg, folder) {
fork icon0
star icon2
watch icon2

+ 23 other calls in file

1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
      };
    }
  })
);

let msg = chalk.grey(`[${getTimestamp()}] `);
msg += chalk.hex("6441a5")(`[~~~~~~~~~]`);
msg += chalk.hex("a970ff")(` | LIVE |`);

streamers.forEach(streamer => {
fork icon0
star icon1
watch icon1

+ 53 other calls in file

118
119
120
121
122
123
124
125
126
127
return [
  '',
  HEADER,
  ...rows.map(entry => [
    '',
    chalk.grey(entry.contract.padEnd(contractLength)),
    entry.method.padEnd(methodLength),
    ...formatCellShell(entry.min),
    ...formatCellShell(entry.max),
    ...formatCellShell(entry.avg),
fork icon0
star icon0
watch icon1

1308
1309
1310
1311
1312
1313
1314
1315
1316
1317

printBasicHelp(verbose) {
  let initialMargin = '      ';
  let output = initialMargin;
  if (this.overridden) {
    output += chalk.grey(`(overridden) ${this.name}`);
  } else {
    output += this.name;

    output += this._printCommand(initialMargin, true);
fork icon0
star icon0
watch icon159

195
196
197
198
199
200
201
202
203
204
205
    });


    return verification;
  } else {
    console.log(
      chalk.grey(` 🧐 Contract verification not supported on ${targetNetwork}`)
    );
  }
};

fork icon0
star icon0
watch icon0

69
70
71
72
73
74
75
76
77
78
var that = this;

if (process.getuid() != 0) {
  return exec('whoami', function(err, stdout, stderr) {
    Common.printError(cst.PREFIX_MSG + 'You have to run this command as root. Execute the following command:');
    Common.printError(cst.PREFIX_MSG + chalk.grey('      sudo env PATH=$PATH:' + path.dirname(process.execPath) + ' pm2 logrotate -u ' + stdout.trim()));

    cb ? cb(Common.retErr('You have to run this with elevated rights')) : that.exitCli(cst.ERROR_EXIT);
  });
}
fork icon0
star icon0
watch icon663

+ 3 other calls in file

51
52
53
54
55
56
57
58
59
60
}

function getDestinationInfo (dest) {
  if (dest.endsWith('.json')) {
    return {
      banner: grey('[json]'),
      tableEntryType: grey('json'),
      toTable: false
    }
  }
fork icon0
star icon0
watch icon472

+ 7 other calls in file