Skip to content

Easy way to check the environment variable NODE_DEBUG for the nested flags.

License

Notifications You must be signed in to change notification settings

nodules/debug-flags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debug-flags NPM version Build Status

Development Dependency status

Easy way to check the environment variable NODE_DEBUG for the presence of the nested flags.

Install

$ npm install --save debug-flags

Usage example

// suppose NODE_DEBUG="app lib:func"
var isDebugEnabled = require('debug-flags');

isDebugEnabled('app'); // => true
isDebugEnabled('app:something:nested'); // => true
isDebugEnabled('flag'); // => false
isDebugEnabled('lib'); // => false
isDebugEnabled('lib:func'); // => true
isDebugEnabled('lib:func:xxx'); // => true

Have fun!

About

Easy way to check the environment variable NODE_DEBUG for the nested flags.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published