Skip to content

Commit

Permalink
improve the consoleLog global function
Browse files Browse the repository at this point in the history
  • Loading branch information
Falsal committed Jan 18, 2024
1 parent 0e6c27d commit ca4ba54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ for (const [key, value] of searchParams) {
return obj;
}

export function consoleLog(textOutput, varOutput, doubleLine = false) {
export function consoleLog(textOutput ="output :", varOutput = null, doubleLine = false) {
if(process.env.NODE_ENV !== "production"){
if(!!doubleLine){
console.log("----------------------------")
console.log(textOutput);
console.log(varOutput);
console.log("=============================")
}else{
console.log(textOutput, varOutput);
(textOutput && varOutput) ? console.log(textOutput, varOutput) : textOutput ? console.log(textOutput) : console.log(varOutput);
}
return;
}
Expand Down

0 comments on commit ca4ba54

Please sign in to comment.