Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Some debug utility for both server-side and client-side javascript.
npm install --save debug-util
and
var debugUtil = require('debug-util');
<script src="/path/to/debugUtil.js"></script>
Client Side, debugUtil
object is defined as window.debugUtil
logger = debugUtil.getColorLogger("myLogger","info","cyan");
logger.log("message");
e.g. this code will display like this
defaultLogger = debugUtil.getColorLogger();
defaultLogger.log("This line is 'debug' level and color is 'default'");
defaultLogger.fatal("This line is 'fatal' level and color is 'red'");
defaultLogger.error("This line is 'error' level and color is 'red'");
defaultLogger.warn("This line is 'warn' level and color is 'yellow'");
defaultLogger.info("This line is 'info' level and color is 'cyan'");
defaultLogger.debug("This line is 'debug' level and color is 'default'");
defaultLogger.trace("This line is 'trace' level and color is 'white'");
//Set Name and Level
appLogger = debugUtil.getColorLogger("App","info");
appLogger.log("This line is 'info' level and color is 'default' and appender name is 'App'");
//Set Name, Level and Color
sysLogger = debugUtil.getColorLogger("Sys","warn","magenta");
sysLogger.log("This line is 'warn' level and color is 'magenta' and appender name is 'Sys'");
function sum(a,b){
return a+b;
}
sum = debugUtil.loggingWrap(this,sum);
sum(1,2);
in your console
Start sum
arguments[0] = 1
arguments[1] = 2
result = [3]
debugUtil.debugToScreen("message");
message will append to document.body
and will hide on click.
Licensed under the incredibly permissive MIT License
Copyright © 2012 Takeharu.Oshida
FAQs
Some debug utility for both server-side and client-side javascript.
The npm package debug-util receives a total of 2 weekly downloads. As such, debug-util popularity was classified as not popular.
We found that debug-util 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.