debug exposes a function; simply pass this function the name of your module, and it will return a decorated version of console.error for you to pass debug statements ...
A tutorial with examples of various access and display types can be seen at crotwell.github.io/seisplotjs. Also see the wiki. Install with npm i --save seisplotjs.