How to use the ansi-escape-sequences.format function in ansi-escape-sequences

To help you get started, we’ve selected a few ansi-escape-sequences 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 jsdoc2md / jsdoc-to-markdown / bin / cli.js View on Github external
function halt (err) {
  if (err.code === 'EPIPE') process.exit(0) /* no big deal */

  if (config) {
    if (config.verbose) {
      console.error(ansi.format(err.stack || err, 'red'))
    } else {
      console.error(ansi.format('Error: ' + err.message, 'red'))
      console.error(ansi.format('(run jsdoc2md with --verbose for a stack trace)', 'red'))
    }
  } else {
    console.error(ansi.format(err.message, 'red'))
  }
  console.error(usage)
  process.exitCode = 1
}
github jsdoc2md / jsdoc-to-markdown / bin / cli.js View on Github external
function halt (err) {
  if (err.code === 'EPIPE') process.exit(0) /* no big deal */

  if (config) {
    if (config.verbose) {
      console.error(ansi.format(err.stack || err, 'red'))
    } else {
      console.error(ansi.format('Error: ' + err.message, 'red'))
      console.error(ansi.format('(run jsdoc2md with --verbose for a stack trace)', 'red'))
    }
  } else {
    console.error(ansi.format(err.message, 'red'))
  }
  console.error(usage)
  process.exitCode = 1
}
github giano / Telegrammer / code / logger.js View on Github external
error: function (error) {
    if (error) {
      Logger.trace();
      var error_msg = ansi.format(_.trim(error.message || error), 'red');
      if (log_file_path) {
        try {
          fs.appendFile(log_file_path, formatForLogFile(error_msg));
        } catch (e) {

        }
      } else {
        console.error(error_msg);
      }
    }
  },
  /**
github choojs / bankai / lib / cmd-build.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}
github choojs / bankai / bin / index.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}
github nearform / node-clinic-doctor / bin.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}
github choojs / bankai / lib / ui.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}
github ahdinosaur / gyne / bin.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}
github stackhtml / documentify / bin.js View on Github external
function clr (text, color) {
  return process.stdout.isTTY ? ansi.format(text, color) : text
}

ansi-escape-sequences

A simple library containing all known terminal ansi escape codes and sequences.

MIT
Latest version published 1 year ago

Package Health Score

59 / 100
Full package analysis