From 079ff4cc662a890cdaf9c9c3947eb9c8167289a9 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 8 Aug 2018 15:20:18 +0200 Subject: [PATCH] The default for opts.colorize is chalk.supportsColor --- Readme.md | 4 +++- index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 1ec13099..d903062f 100644 --- a/Readme.md +++ b/Readme.md @@ -113,7 +113,7 @@ with keys corresponding to the options described in [CLI Arguments](#cliargs): ```js { - colorize: false, // --colorize + colorize: chalk.supportsColor, // --colorize crlf: false, // --crlf errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys errorProps: '', // --errorProps @@ -124,6 +124,8 @@ with keys corresponding to the options described in [CLI Arguments](#cliargs): } ``` +The `colorize` default follows +[`chalk.supportsColor](https://www.npmjs.com/package/chalk#chalksupportscolor). ## License diff --git a/index.js b/index.js index 0d6d1afd..16f918e8 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ const levels = { } const defaultOptions = { - colorize: false, + colorize: chalk.supportsColor, crlf: false, errorLikeObjectKeys: ['err', 'error'], errorProps: '',