Skip to content

Instantly share code, notes, and snippets.

@thevangelist
Created December 27, 2021 11:19
Show Gist options
  • Save thevangelist/401ce0fdbd306c088ade55eff92d401e to your computer and use it in GitHub Desktop.
Save thevangelist/401ce0fdbd306c088ade55eff92d401e to your computer and use it in GitHub Desktop.
Console.log only in dev mode (debug)
const debug =
process.env.NODE_ENV !== "production"
? console.log.bind(console)
: () => void 8;
export default debug;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment