
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
A lightweight, zero-dependencies, asynchronous and fully-tested pure Node.js debugger
Ajouter temps UTC!
A lightweight, zero-dependencies, asynchronous and fully-tested pure Node.js debugger.
bugbug is a lightweight, zero-dependencies, asynchronous and fully-tested pure Node.js debugger. It writes on process.stderr when the DEBUG environment variable is set and match a specific module's name/pattern and uses a specified/random output color if the terminal allows it.
The aim of this project is to provide a very simple, lightweight, zero-dependency, fast and fully-tested debugger.
npm install bugbug
npm i -S bugbug
ESLint with Airbnb base rules. See Airbnb JavaScript Style Guide.
npm run lint
Mocha and Chai.
npm test
bugbug module exports one function named getDebugger. This function once called will return the debug function related to a specific debugger's name that will allow to debug on stderr.
// first get the getDebugger function
const getDebugger = require('bugbug');
// then get the debug function from a stored or newly created debugger
const debug = getDebugger('my-module', 'red');
// OR faster way to get the debug function
const debug = require('bugbug')('my-module', 'red');
name
<String> The debugger's name. Generally the module's name to debug. Default: debug
color
<String> The debugging color if the terminal allows it. Default: red
for the default debugger or a random
color
red
green
yellow
blue
magenta
cyan
lightRed
lightGreen
lightYellow
lightBlue
lightMagenta
lightCyan
Returns: <Function> Function called debug to finally debug in the name of the related module.
Throws: NO
You can find examples here: docs/examples
const debug = require('bugbug')('my-module', 'red');
debug('debugging');
debug('still debugging');
const debug = require('bugbug')('node-sparkline', 'green');
const options = {
values: [1, 2, 3, 4, 5],
width: 500,
height: 500,
};
debug('everything\'s fine');
debug('process done');
debug('sparkline generated in SVG format,', 'additional stuff');
debug('options:', options);
const debug = require('bugbug')();
const options = {
values: [1, 2, 3, 4, 5],
width: 500,
height: 500,
};
debug('main debugger is debugging');
debug('in red color if terminal allows it');
debug('options:', options);
DEBUG is used to whether debug a specific module. DEBUG value can be a comma-separated string listing module names to debug or to avoid debugging. Format is: DEBUG=moduleName[,moduleName]
DEBUG=moduleName
will debug moduleName module;DEBUG=moduleName:*
will debug moduleName module and sub modules;DEBUG=-moduleName:*
will disable debugging any moduleName module and sub modules;DEBUG=*
will debug all moduleName module and sub modules plus other modules used in your project if they use bugbug or an equivalent debugger based on process.env.DEBUG value.This project has a Code of Conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
Please take a moment to read our Contributing Guidelines if you haven't yet done so.
Please see our Support page if you have any questions or for any help needed.
For any security concerns or issues, please visit our Security Policy page.
MIT.
FAQs
A lightweight, zero-dependencies, asynchronous and fully-tested pure Node.js debugger
The npm package bugbug receives a total of 92 weekly downloads. As such, bugbug popularity was classified as not popular.
We found that bugbug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.