Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: util: add more predefined color codes to inspect.colors
  • Loading branch information
BridgeAR committed Nov 26, 2019
commit 6d6b860561b8209cab62d5200d9d6e881ed7d223
5 changes: 3 additions & 2 deletions lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ inspect.colors = ObjectAssign(ObjectCreate(null), {
italic: [3, 23],
underline: [4, 24],
blink: [5, 25],
inverse: [7, 27], // Alias: swapcolors, swapColors; Swap forground and background colors
// Swap forground and background colors
inverse: [7, 27], // Alias: swapcolors, swapColors
hidden: [8, 28], // Alias: conceal
strikethrough: [9, 29], // Alias: strikeThrough, crossedout, crossedOut
doubleunderline: [21, 24], // Alias: doubleUnderline
Expand Down Expand Up @@ -317,7 +318,7 @@ inspect.colors = ObjectAssign(ObjectCreate(null), {
});

function defineColorAlias(target, alias) {
Object.defineProperty(inspect.colors, alias, {
ObjectDefineProperty(inspect.colors, alias, {
get() {
return this[target];
},
Expand Down