Skip to content

Instantly share code, notes, and snippets.

@AutoSponge
Last active March 29, 2017 23:36
Show Gist options
  • Select an option

  • Save AutoSponge/af6664bbf763a11044a578ae1d05f76d to your computer and use it in GitHub Desktop.

Select an option

Save AutoSponge/af6664bbf763a11044a578ae1d05f76d to your computer and use it in GitHub Desktop.
const debug = require('debug')(__filename.replace(/^.*[/]([^.]+)\.js/, '$1')) // file-name
const debug = require('debug')(__filename.replace(/^.*[/](.*)[/]([^.]+)\.js/, '$1:$2')) // folder:file-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment