Skip to content

Commit

Permalink
simplifying code by using the ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-karatsiuba committed Feb 27, 2023
1 parent c3919c6 commit df369db
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ const isVerbose = (level: LogLevel) => {

const verboseLevelIndex = logLevels.indexOf(verboseLevel)
const logLevelIndex = logLevels.indexOf(level)
if (logLevelIndex >= verboseLevelIndex) {
return true
} else {
return false
}
return logLevelIndex >= verboseLevelIndex ? true : false
}

const doLog = (type: LogLevel, args: any[]) => {
Expand Down

0 comments on commit df369db

Please sign in to comment.