
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A debugging utility that evaluates messages lazily.
import { createDebug } from 'ldebug';
import process from 'node:process';
const debug = createDebug({
isDevelopment: process.env.NODE_ENV !== 'production',
highlight: true,
prettyStringify: true,
});
// The following line will log "Hello ['world']" with colors in development and do nothing in production (the template string won't be evaluated either).
debug((f) => f`Hello ${['world']}`);
Returns: LazyDebugFunction
Creates a new debug function with the given options.
Type: boolean
Required: true
A boolean representing whether or not the application is running in development. If the application is not running in the development, createDebug will return a no-op function.
Type: boolean
Default: true
Highlights the messages using cli-highlighter.
Type: boolean
Default: true
If true, uses [json-stringify-pretty-compact] to stringify objects. Otherwise, uses JSON.stringify().
Type: (message: string) => void
Default: console.log
A custom logger function to use when logging debug messages.
Type: (callback: (format: FormatHelper) => string) => void
The callback (only called in development) that returns the message to log.
Type: FormatHelper
export type FormatHelper = (
strings: TemplateStringsArray,
...values: unknown[]
) => string;
A format helper ES6 template tag that applies transformations to the strings and values in the template string (e.g. formatting and highlighting) for more readable output.
FAQs
A debugging utility that evaluates messages lazily.
We found that ldebug 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.