16 lines
457 B
JavaScript
16 lines
457 B
JavaScript
|
const logDebug = true;
|
||
|
|
||
|
module.exports = {
|
||
|
createLog: (components) => (...args) => {
|
||
|
let compString = '';
|
||
|
for (const i in components) {
|
||
|
const component = components[i];
|
||
|
if (i >= (components.length - 1)) {
|
||
|
compString += `[${component}]`;
|
||
|
} else {
|
||
|
compString += `[${component}] `;
|
||
|
}
|
||
|
}
|
||
|
logDebug && console.log(compString, ...args);
|
||
|
}
|
||
|
};
|