The tiniest and the fastest library for terminal output formatting with ANSI colors
89
A simple logging utility that supports configurable colored output based on user preferences. The logger should respect color settings and output formatted log messages at different severity levels.
error() method that outputs red text when colors are enabled @testsuccess() method that outputs green text when colors are enabled @testwarning() method that outputs yellow text when colors are enabled @testinfo() method that outputs cyan text when colors are enabled @test@generates
/**
* Creates a logger instance with configurable color support.
*
* @param {Object} config - Configuration object
* @param {boolean} config.colorEnabled - Whether to enable colored output
* @returns {Object} Logger instance with error, success, warning, and info methods
*/
function createLogger(config) {
// IMPLEMENTATION HERE
}
module.exports = { createLogger };Provides terminal color formatting support.
Install with Tessl CLI
npx tessl i tessl/npm-picocolorsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10