How to use the ansi-styles.magenta function in ansi-styles

To help you get started, we’ve selected a few ansi-styles 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 saul / demofile / dist / examples / dumpfile.js View on Github external
"use strict";
// tslint:disable:no-console
Object.defineProperty(exports, "__esModule", { value: true });
// This file is an thorough example of how to log player kills,
// team scores, chat text and server cvar changes from a demo file.
const ansiStyles = require("ansi-styles");
const assert = require("assert");
const fs = require("fs");
const util = require("util");
const demo = require("../demo");
const player_1 = require("../entities/player");
const colourReplacements = [
    { pattern: /\x01/g, ansi: ansiStyles.whiteBright.open },
    { pattern: /\x02/g, ansi: ansiStyles.red.open },
    { pattern: /\x03/g, ansi: ansiStyles.magenta.open },
    { pattern: /\x04/g, ansi: ansiStyles.greenBright.open },
    { pattern: /\x05/g, ansi: ansiStyles.green.open },
    { pattern: /\x06/g, ansi: ansiStyles.greenBright.open },
    { pattern: /\x07/g, ansi: ansiStyles.redBright.open },
    { pattern: /\x08/g, ansi: ansiStyles.gray.open },
    { pattern: /\x09/g, ansi: ansiStyles.yellowBright.open },
    { pattern: /\x0A/g, ansi: ansiStyles.white.open },
    { pattern: /\x0B/g, ansi: ansiStyles.blueBright.open },
    { pattern: /\x0C/g, ansi: ansiStyles.blue.open },
    { pattern: /\x0D/g, ansi: ansiStyles.magenta.open },
    { pattern: /\x0E/g, ansi: ansiStyles.magentaBright.open },
    { pattern: /\x0F/g, ansi: ansiStyles.red.open },
    { pattern: /\x10/g, ansi: ansiStyles.yellow.open } // Orange
];
const standardMessages = {
    Cstrike_Chat_All: "\x03%s\x01 : %s",
github serverless / components / registry / github-webhook / src / diff-options.js View on Github external
actual: forceColor.red('-') + ' ',
    expected: forceColor.green('+') + ' ',
    padding: '  '
  },
  error: {
    ctor: {
      open: ansiStyles.grey.open + '(',
      close: ')' + ansiStyles.grey.close
    },
    name: ansiStyles.magenta
  },
  function: {
    name: ansiStyles.blue,
    stringTag: ansiStyles.magenta
  },
  global: ansiStyles.magenta,
  item: {
    after: forceColor.grey(',')
  },
  list: {
    openBracket: forceColor.grey('['),
    closeBracket: forceColor.grey(']')
  },
  mapEntry: {
    after: forceColor.grey(',')
  },
  maxDepth: forceColor.grey('…'),
  null: ansiStyles.yellow,
  number: ansiStyles.yellow,
  object: {
    openBracket: forceColor.grey('{'),
    closeBracket: forceColor.grey('}'),
github avajs / ava / lib / concordance-options.js View on Github external
},
	function: {
		name: ansiStyles.blue,
		stringTag: ansiStyles.magenta
	},
	global: ansiStyles.magenta,
	item: {after: forceColor.grey(',')},
	list: {openBracket: forceColor.grey('['), closeBracket: forceColor.grey(']')},
	mapEntry: {after: forceColor.grey(',')},
	maxDepth: forceColor.grey('…'),
	null: ansiStyles.yellow,
	number: ansiStyles.yellow,
	object: {
		openBracket: forceColor.grey('{'),
		closeBracket: forceColor.grey('}'),
		ctor: ansiStyles.magenta,
		stringTag: {open: ansiStyles.magenta.open + '@', close: ansiStyles.magenta.close},
		secondaryStringTag: {open: ansiStyles.grey.open + '@', close: ansiStyles.grey.close}
	},
	property: {
		after: forceColor.grey(','),
		keyBracket: {open: forceColor.grey('['), close: forceColor.grey(']')},
		valueFallback: forceColor.grey('…')
	},
	react: {
		functionType: forceColor.grey('\u235F'),
		openTag: {
			start: forceColor.grey('<'),
			end: forceColor.grey('>'),
			selfClose: forceColor.grey('/'),
			selfCloseVoid: ' ' + forceColor.grey('/')
		},
github serverless / components / registry / github-webhook / src / diff-options.js View on Github external
circular: forceColor.grey('[Circular]'),
  date: {
    invalid: forceColor.red('invalid'),
    value: ansiStyles.blue
  },
  diffGutters: {
    actual: forceColor.red('-') + ' ',
    expected: forceColor.green('+') + ' ',
    padding: '  '
  },
  error: {
    ctor: {
      open: ansiStyles.grey.open + '(',
      close: ')' + ansiStyles.grey.close
    },
    name: ansiStyles.magenta
  },
  function: {
    name: ansiStyles.blue,
    stringTag: ansiStyles.magenta
  },
  global: ansiStyles.magenta,
  item: {
    after: forceColor.grey(',')
  },
  list: {
    openBracket: forceColor.grey('['),
    closeBracket: forceColor.grey(']')
  },
  mapEntry: {
    after: forceColor.grey(',')
  },
github alexkuz / nyan-progress-webpack-plugin / index.js View on Github external
'use strict';
var AnsiEscapes = require('ansi-escapes');
var AnsiStyles = require('ansi-styles');
var webpack = require('webpack');

require('object.assign').shim();

var bold = AnsiStyles.bold;
var inverse = AnsiStyles.inverse;

var red = AnsiStyles.red;
var yellow = AnsiStyles.yellow;
var green = AnsiStyles.green;
var blue = AnsiStyles.blue;
var magenta = AnsiStyles.magenta;

var bgRed = AnsiStyles.bgRed;
var bgYellow = AnsiStyles.bgYellow;
var bgGreen = AnsiStyles.bgGreen;
var bgBlue = AnsiStyles.bgBlue;

var cursorUp = AnsiEscapes.cursorUp;
var cursorDown = AnsiEscapes.cursorDown;
var eraseEndLine = AnsiEscapes.eraseEndLine;
var cursorSavePosition = AnsiEscapes.cursorSavePosition;
var cursorRestorePosition = AnsiEscapes.cursorRestorePosition;

var width = 50;
var stdoutLineCount = 0;

var nyanTemplate = {
github avajs / ava / lib / concordance-options.js View on Github external
const colorTheme = {
	boolean: ansiStyles.yellow,
	circular: forceColor.grey('[Circular]'),
	date: {
		invalid: forceColor.red('invalid'),
		value: ansiStyles.blue
	},
	diffGutters: {
		actual: forceColor.red('-') + ' ',
		expected: forceColor.green('+') + ' ',
		padding: '  '
	},
	error: {
		ctor: {open: ansiStyles.grey.open + '(', close: ')' + ansiStyles.grey.close},
		name: ansiStyles.magenta
	},
	function: {
		name: ansiStyles.blue,
		stringTag: ansiStyles.magenta
	},
	global: ansiStyles.magenta,
	item: {after: forceColor.grey(',')},
	list: {openBracket: forceColor.grey('['), closeBracket: forceColor.grey(']')},
	mapEntry: {after: forceColor.grey(',')},
	maxDepth: forceColor.grey('…'),
	null: ansiStyles.yellow,
	number: ansiStyles.yellow,
	object: {
		openBracket: forceColor.grey('{'),
		closeBracket: forceColor.grey('}'),
		ctor: ansiStyles.magenta,
github avajs / ava / lib / concordance-options.js View on Github external
value: ansiStyles.blue
	},
	diffGutters: {
		actual: forceColor.red('-') + ' ',
		expected: forceColor.green('+') + ' ',
		padding: '  '
	},
	error: {
		ctor: {open: ansiStyles.grey.open + '(', close: ')' + ansiStyles.grey.close},
		name: ansiStyles.magenta
	},
	function: {
		name: ansiStyles.blue,
		stringTag: ansiStyles.magenta
	},
	global: ansiStyles.magenta,
	item: {after: forceColor.grey(',')},
	list: {openBracket: forceColor.grey('['), closeBracket: forceColor.grey(']')},
	mapEntry: {after: forceColor.grey(',')},
	maxDepth: forceColor.grey('…'),
	null: ansiStyles.yellow,
	number: ansiStyles.yellow,
	object: {
		openBracket: forceColor.grey('{'),
		closeBracket: forceColor.grey('}'),
		ctor: ansiStyles.magenta,
		stringTag: {open: ansiStyles.magenta.open + '@', close: ansiStyles.magenta.close},
		secondaryStringTag: {open: ansiStyles.grey.open + '@', close: ansiStyles.grey.close}
	},
	property: {
		after: forceColor.grey(','),
		keyBracket: {open: forceColor.grey('['), close: forceColor.grey(']')},
github dreamyguy / gitlogg / src / colors.js View on Github external
const styles = require('ansi-styles');

export const red = styles.red.open;
export const magenta = styles.magenta.open;
export const yellow = styles.yellow.open;
export const blue = styles.blue.open;
export const green = styles.green.open;
export const reset = styles.reset.open;
github serverless / components / registry / github-webhook / src / diff-options.js View on Github external
list: {
    openBracket: forceColor.grey('['),
    closeBracket: forceColor.grey(']')
  },
  mapEntry: {
    after: forceColor.grey(',')
  },
  maxDepth: forceColor.grey('…'),
  null: ansiStyles.yellow,
  number: ansiStyles.yellow,
  object: {
    openBracket: forceColor.grey('{'),
    closeBracket: forceColor.grey('}'),
    ctor: ansiStyles.magenta,
    stringTag: {
      open: ansiStyles.magenta.open + '@',
      close: ansiStyles.magenta.close
    },
    secondaryStringTag: {
      open: ansiStyles.grey.open + '@',
      close: ansiStyles.grey.close
    }
  },
  property: {
    after: forceColor.grey(','),
    keyBracket: { open: forceColor.grey('['), close: forceColor.grey(']') },
    valueFallback: forceColor.grey('…')
  },
  regexp: {
    source: {
      open: ansiStyles.blue.open + '/',
      close: '/' + ansiStyles.blue.close