Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

depugger

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depugger - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "depugger",
"version": "0.1.1",
"version": "0.1.2",
"description": "small debugging utility",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,5 +9,31 @@ # node-depugger

Depugger is a small lib that provides a debugging utility.
## depugger([debug, [name]]), depugger(options)
`depugger` returns a function that supports all of the `util.format` features and outputs debug messages based on the initial configuration.
* `debug`: specifies if logged messages should be outputted, optional, default: false
* `name`: a category key that will prepend every message, optional, default: ""
* `options`: options hash that can be used to submit all of the above parameters at once
````javascript
var depugger = require('depugger');
var debug = depugger(true, 'fooDebugger');
debug('foo');
debug('bar "%s"', 'bax');
debug('spam %d eggs', 10);
//output to console:
//[fooDebugger] foo
//[fooDebugger] bar "bax"
//[fooDebugger] spam 10 eggs
````
Alternatively all parameters can be specified via an options hash:
````javascript
var depugger = require('depugger');
var debug = depugger({debug: true, name: 'fooDebugger'});

@@ -14,0 +40,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc