New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

debug-helper

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debug-helper

A simple helper for easy use of the debug package

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

debug-helper

A simple helper for easy use of the debug package

Usage

Install

Install with Yarn

yarn add debug-helper

or install with NPM

npm i debug-helper

Your scripts

ES6 imports.

import dh from "debug-helper"

or NodeJS traditional require

const dh = require("debug-helper").default

you can configure it before use it

dh.configure({appNamespace:"my-app-name"}) //Default appNamespace = process.env.DH_APP_NAMESPACE

and then use the shortcut methods

dh.debug.test("test message") //output -> my-app-name:test: test message
dh.debug.production("production production"), //output -> my-app-name:test: production message
dh.debug.development("development development"), //output -> my-app-name:test: development message
dh.debug.staging("staging staging"), //output -> my-app-name:test: staging message
dh.debug.error("error error"), //output -> my-app-name:test: error message
dh.debug.info("info info") //output -> my-app-name:test: info message

or create your own decorators

const debug = db("intern-namespace")
debug("a message") //output -> my-app-name:intern-namespace: a message

More

For more info about debug package uses like how to use the DEBUG environment variable go to debug docs.

Keywords

tool

FAQs

Package last updated on 08 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts