# debug

# Debug(name) ⇒ function

Creates a function that uses console.log with a styled name. The name is checked against the jscadUtilsDebug settings enabled and disabled list.

If the name is enabled, a function that uses console.log is returned, if it is disabled, an empty function is returned.

You can enable a debug logger in the util.init method by including a string of comma separated names. Wild cards with * are supported, and you can disable a specific name using a - sign in front of the name.

Kind: global function
Returns: function - A debug function if enabled otherwise an empty function.

Param Type Description
name String The name of the debug funciton.

Example

util.init(CSG, { debug: 'jscadUtils:group' });