Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
log-update-async-hook
Advanced tools
This is a fork of the log-update by Sindre Sorhus, that uses async-exit-hook
to restore terminal cursor state when the process terminates.
Usage of exit-hook
or signal-exit
hook in the original log-update
prevents execution of asynchronous operations on signals (SIGTERM
, SIGHUP
, etc.) in the code of the main application.
So I've replaced them by async-exit-hook
, rewritten code to allow execution on Node versions below 4.x
and bundled some dependencies into the package.
Log by overwriting the previous output in the terminal.
Useful for rendering progress bars, animations, etc.
$ npm install --save log-update
const logUpdate = require('log-update');
const frames = ['-', '\\', '|', '/'];
let i = 0;
setInterval(() => {
const frame = frames[i = ++i % frames.length];
logUpdate(
`
♥♥
${frame} unicorns ${frame}
♥♥
`
);
}, 80);
Log to stdout.
Clear the logged output.
Persist the logged output.
Useful if you want to start a new log session below the current one.
Log to stderr.
Get a logUpdate
method that logs to the specified stream.
MIT © Sindre Sorhus
FAQs
log-update fork that uses async-exit-hook internally
We found that log-update-async-hook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.