Skip to content

Commit

Permalink
supportsColor.level => supportsColor.stdout.level
Browse files Browse the repository at this point in the history
you wrote wrong

console.log(supportsColor.level)
undefined

console.log(supportsColor.stdout.level >= 2)

true
  • Loading branch information
cw881014 authored Nov 8, 2017
1 parent 7116906 commit c7a4989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports.colors = [ 6, 2, 3, 4, 5, 1 ];

try {
var supportsColor = require('supports-color');
if (supportsColor && supportsColor.level >= 2) {
if (supportsColor && supportsColor.stdout.level >= 2) {
exports.colors = [
20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
Expand Down

0 comments on commit c7a4989

Please sign in to comment.