Update a missed reference.

This commit is contained in:
Kayla Washburn 2018-01-12 11:39:09 -07:00 committed by GitHub
parent ad1a43212d
commit 8a069390c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const ansiStyles = require('ansi-styles');
const supportsColor = require('supports-color');
const stdoutColor = require('supports-color').stdout;
const template = require('./templates.js');
@ -19,7 +19,7 @@ function applyOptions(obj, options) {
options = options || {};
// Detect level if not set manually
const scLevel = supportsColor ? supportsColor.level : 0;
const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options.level === undefined ? scLevel : options.level;
obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
@ -224,5 +224,5 @@ function chalkTag(chalk, strings) {
Object.defineProperties(Chalk.prototype, styles);
module.exports = Chalk(); // eslint-disable-line new-cap
module.exports.supportsColor = supportsColor.stdout;
module.exports.supportsColor = stdoutColor;
module.exports.default = module.exports; // For TypeScript