post-me

Home > post-me > debug

debug() function

Create a logger function with a specific namespace

Signature:

export declare function debug(namespace: string, log?: (...data: any[]) => void): (...data: any[]) => void;

Parameters

Parameter Type Description
namespace string The namespace will be prepended to all the arguments passed to the logger function
log (…data: any[]) => void The underlying logger (console.log by default)

Returns:

(…data: any[]) => void