OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/helpers/debug_output.ts

17 lines
310 B

/**
* Execute the callback when DEBUG is defined
* through webpack.
*/
export function when_debugging(cb) {
if (DEBUG) {
cb();
}
}
/**
* Log with console.log when DEBUG is defined
* through webpack.
*/
export function debug_log(...args) {
when_debugging(() => console.log('[DEBUG] ', args));
}