From 095d11ac15a32d2fd6dea07d25be554958b60e24 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sun, 22 Sep 2019 18:56:29 +0700 Subject: [PATCH] Add enum Level to JavaScript Fix https://github.com/chalk/chalk/issues/363 --- source/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/index.js b/source/index.js index 686758b..c9c8f75 100644 --- a/source/index.js +++ b/source/index.js @@ -223,4 +223,15 @@ chalk.supportsColor = stdoutColor; chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap chalk.stderr.supportsColor = stderrColor; +chalk.Level = { + None: 0, + Basic: 1, + Ansi256: 2, + TrueColor: 3, + 0: 'None', + 1: 'Basic', + 2: 'Ansi256', + 3: 'TrueColor' +} + module.exports = chalk;