Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/node-socket/node_modules/nodemon/lib/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/node-socket/node_modules/nodemon/lib/utils/colour.js
/**
 * Encodes a string in a colour: red, yellow or green
 * @param  {String} c   colour to highlight in
 * @param  {String} str the string to encode
 * @return {String}     coloured string for terminal printing
 */
function colour(c, str) {
  return (colour[c] || colour.black) + str + colour.black;
}

function strip(str) {
  re.lastIndex = 0; // reset position
  return str.replace(re, '');
}

colour.red = '\x1B[31m';
colour.yellow = '\x1B[33m';
colour.green = '\x1B[32m';
colour.black = '\x1B[39m';

var reStr = Object.keys(colour).map(key => colour[key]).join('|');
var re = new RegExp(('(' + reStr + ')').replace(/\[/g, '\\['), 'g');

colour.strip = strip;

module.exports = colour;

ZeroDay Forums Mini