How to use the ansicolors.cyan function in ansicolors

To help you get started, we’ve selected a few ansicolors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graalvm / graaljs / deps / npm / bin / npm-cli.js View on Github external
case 'patch':
              type = color.green(type)
              break
          }
        }
        const changelog = `https://github.com/npm/cli/releases/tag/v${latest}`
        notifier.notify({
          message: `New ${type} version of ${pkg.name} available! ${
            useColor ? color.red(old) : old
          } ${useUnicode ? '→' : '->'} ${
            useColor ? color.green(latest) : latest
          }\n` +
          `${
            useColor ? color.yellow('Changelog:') : 'Changelog:'
          } ${
            useColor ? color.cyan(changelog) : changelog
          }\n` +
          `Run ${
            useColor
              ? color.green(`npm install -g ${pkg.name}`)
              : `npm i -g ${pkg.name}`
          } to update!`
        })
      }
    }
    npm.commands[npm.command](npm.argv, function (err) {
      // https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
      if (
        !err &&
        npm.config.get('ham-it-up') &&
        !npm.config.get('json') &&
        !npm.config.get('parseable') &&
github fukaoi / crystal-nodejs / ext / v10.16.0 / lib / node_modules / npm / bin / npm-cli.js View on Github external
case 'patch':
              type = color.green(type)
              break
          }
        }
        const changelog = `https://github.com/npm/cli/releases/tag/v${latest}`
        notifier.notify({
          message: `New ${type} version of ${pkg.name} available! ${
            useColor ? color.red(old) : old
          } ${useUnicode ? '→' : '->'} ${
            useColor ? color.green(latest) : latest
          }\n` +
          `${
            useColor ? color.yellow('Changelog:') : 'Changelog:'
          } ${
            useColor ? color.cyan(changelog) : changelog
          }\n` +
          `Run ${
            useColor
              ? color.green(`npm install -g ${pkg.name}`)
              : `npm i -g ${pkg.name}`
          } to update!`
        })
      }
    }
    npm.commands[npm.command](npm.argv, function (err) {
      // https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
      if (
        !err &&
        npm.config.get('ham-it-up') &&
        !npm.config.get('json') &&
        !npm.config.get('parseable') &&
github graalvm / graaljs / deps / npm / lib / view.js View on Github external
}
    if (info.license.toLowerCase().trim() === 'proprietary') {
      info.license = style.bright(color.red(info.license))
    } else {
      info.license = color.green(info.license)
    }
    console.log('')
    console.log(
      style.underline(style.bright(`${info.name}@${info.version}`)) +
      ' | ' + info.license +
      ' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
      ' | versions: ' + info.versions
    )
    info.description && console.log(info.description)
    if (info.repo || info.site) {
      info.site && console.log(color.cyan(info.site))
    }

    const warningSign = unicode ? ' ⚠️ ' : '!!'
    info.deprecated && console.log(
      `\n${style.bright(color.red('DEPRECATED'))}${
        warningSign
      } - ${info.deprecated}`
    )

    if (info.keywords.length) {
      console.log('')
      console.log('keywords:', info.keywords.join(', '))
    }

    if (info.bins.length) {
      console.log('')
github graalvm / graaljs / deps / npm / lib / view.js View on Github external
tarball: color.cyan(manifest.dist.tarball),
      shasum: color.yellow(manifest.dist.shasum),
      integrity: manifest.dist.integrity && color.yellow(manifest.dist.integrity),
      fileCount: manifest.dist.fileCount && color.yellow(manifest.dist.fileCount),
      unpackedSize: unpackedSize && color.yellow(unpackedSize.value) + ' ' + unpackedSize.unit
    }
    if (info.license.toLowerCase().trim() === 'proprietary') {
      info.license = style.bright(color.red(info.license))
    } else {
      info.license = color.green(info.license)
    }
    console.log('')
    console.log(
      style.underline(style.bright(`${info.name}@${info.version}`)) +
      ' | ' + info.license +
      ' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
      ' | versions: ' + info.versions
    )
    info.description && console.log(info.description)
    if (info.repo || info.site) {
      info.site && console.log(color.cyan(info.site))
    }

    const warningSign = unicode ? ' ⚠️ ' : '!!'
    info.deprecated && console.log(
      `\n${style.bright(color.red('DEPRECATED'))}${
        warningSign
      } - ${info.deprecated}`
    )

    if (info.keywords.length) {
      console.log('')
github graalvm / graaljs / deps / npm / lib / view.js View on Github external
modified: packument.time ? color.yellow(relativeDate(packument.time[packument.version])) : undefined,
      maintainers: (packument.maintainers || []).map((u) => unparsePerson({
        name: color.yellow(u.name),
        email: color.cyan(u.email)
      })),
      repo: (
        manifest.bugs && (manifest.bugs.url || manifest.bugs)
      ) || (
        manifest.repository && (manifest.repository.url || manifest.repository)
      ),
      site: (
        manifest.homepage && (manifest.homepage.url || manifest.homepage)
      ),
      stars: color.yellow('' + packument.users ? Object.keys(packument.users || {}).length : 0),
      tags,
      tarball: color.cyan(manifest.dist.tarball),
      shasum: color.yellow(manifest.dist.shasum),
      integrity: manifest.dist.integrity && color.yellow(manifest.dist.integrity),
      fileCount: manifest.dist.fileCount && color.yellow(manifest.dist.fileCount),
      unpackedSize: unpackedSize && color.yellow(unpackedSize.value) + ' ' + unpackedSize.unit
    }
    if (info.license.toLowerCase().trim() === 'proprietary') {
      info.license = style.bright(color.red(info.license))
    } else {
      info.license = color.green(info.license)
    }
    console.log('')
    console.log(
      style.underline(style.bright(`${info.name}@${info.version}`)) +
      ' | ' + info.license +
      ' | deps: ' + (info.deps.length ? color.cyan(info.deps.length) : color.green('none')) +
      ' | versions: ' + info.versions
github thlorenz / replpad / lib / instructions.js View on Github external
var enabledPlugins = config.plugins && typeof config.plugins === 'object'
  ? allPlugins.filter(pluginIsEnabled) 
  : allPlugins;

var specs = { cpus: Object.keys(os.cpus()).length, platform: os.platform(), host: os.hostname() }
  , v = process.versions
  , plugins = enabledPlugins.map(colors.yellow).join(' | ');

var msgs = [
    ''
  , styles.underline(colors.brightRed('replpad')) + colors.yellow(' v' + pkg.version)
  , ''
  ,   format(colors.cyan('node') + ' %s', colors.yellow('v' + v.node))
    + format(' | %s | %s cpus | %s platform', colors.green(specs.host), colors.green(specs.cpus), colors.green(specs.platform))
    +  format(colors.cyan(' | v8') + ' %s | ' + colors.cyan('uv') + ' %s', colors.yellow('v' + v.v8), colors.yellow('v' + v.uv))
  , ''
  , 'plugins: ' + plugins
  , ''
  , 'If in doubt, enter ' + colors.yellow('.help')
  , '' 
  ];


module.exports = function (output) {
  //msgs.forEach(function (msg) { log.print(msg); });
  msgs.forEach(function (msg) { output.write(msg + '\n'); });
};
github graalvm / graaljs / deps / npm / lib / view.js View on Github external
maintainers: (packument.maintainers || []).map((u) => unparsePerson({
        name: color.yellow(u.name),
        email: color.cyan(u.email)
      })),
      repo: (
github thlorenz / scriptie-talkie / lib / resolve-tales.js View on Github external
function formatResult(result, diffopts) {
  return format('%s %s', colors.cyan('=>'), diffValues({}, result, diffopts));
}
github thlorenz / replpad / lib / instructions.js View on Github external
return config.plugins[x] === undefined || config.plugins[x] === true;
}

var enabledPlugins = config.plugins && typeof config.plugins === 'object'
  ? allPlugins.filter(pluginIsEnabled) 
  : allPlugins;

var specs = { cpus: Object.keys(os.cpus()).length, platform: os.platform(), host: os.hostname() }
  , v = process.versions
  , plugins = enabledPlugins.map(colors.yellow).join(' | ');

var msgs = [
    ''
  , styles.underline(colors.brightRed('replpad')) + colors.yellow(' v' + pkg.version)
  , ''
  ,   format(colors.cyan('node') + ' %s', colors.yellow('v' + v.node))
    + format(' | %s | %s cpus | %s platform', colors.green(specs.host), colors.green(specs.cpus), colors.green(specs.platform))
    +  format(colors.cyan(' | v8') + ' %s | ' + colors.cyan('uv') + ' %s', colors.yellow('v' + v.v8), colors.yellow('v' + v.uv))
  , ''
  , 'plugins: ' + plugins
  , ''
  , 'If in doubt, enter ' + colors.yellow('.help')
  , '' 
  ];


module.exports = function (output) {
  //msgs.forEach(function (msg) { log.print(msg); });
  msgs.forEach(function (msg) { output.write(msg + '\n'); });
};