
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.
nephrite-dev-logger
Advanced tools
DevLogger is a utility class designed to simplify logging in JavaScript applications based on the development environment. It allows you to log messages in a convenient and controlled manner. The class constructor takes a boolean parameter, indicating whe
Nephrite Dev Logger is a utility library designed to simplify logging in JavaScript applications based on the development environment. It allows you to log messages in a convenient and controlled manner, tailored for both development and production environments.
npm i nephrite-dev-logger
To get started, import the library into your project:
import DevLogger from 'nephrite-dev-logger';
const isDevelopment = import.meta.env.DEV;
const dev = new DevLogger(isDevelopment);
// Log message for development
dev.log('development only log')
// dev mode --> development only log
// Log a message for development only
dev.log("This message appears in development", "This message appears in production");
// dev mode --> This message appears in development
// prod mode --> This message appears in production
// Log a message for development and production
dev.log("Both logs shown", "Both logs shown", true);
// dev mode --> Both logs shown Both logs shown
// prod mode --> Both logs shown Both logs shown
// Log a warning for development only
dev.warn("This is a development warning", "This is a production warning");
// dev mode --> This is a development warning
// prod mode --> This is a production warning
// Log an error for development only
dev.error("This is a development error", "This is a production error");
// dev mode --> This is a development error
// prod mode --> This is a production error
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
DevLogger is a utility class designed to simplify logging in JavaScript applications based on the development environment. It allows you to log messages in a convenient and controlled manner. The class constructor takes a boolean parameter, indicating whe
We found that nephrite-dev-logger 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.