
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.
single-line-log2
Advanced tools
Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations
Node.js module that keeps writing to the same line in the console (or a stream). Very useful when you write progress bars, or a status message during longer operations. Supports multilines.
This patches single-line-log for columns missing and adds line feed normalization.
npm install single-line-log2
var log = require('single-line-log2').stdout;
// or pass any stream:
// var log = require('single-line-log2')(process.stdout);
var read = 0;
var size = fs.statSync('super-large-file').size;
var rs = fs.createReadStream('super-large-file');
rs.on('data', function(data) {
read += data.length;
var percentage = Math.floor(100*read/size);
// Keep writing to the same two lines in the console
log('Writing to super large file\n[' + percentage + '%]', read, 'bytes read');
});
Clears the log (i.e., writes a newline).
var log = require('single-line-log2').stdout;
log('Line 1');
log.clear();
log('Line 2');
Outputs to process.stdout.
Outputs to process.stderr.
MIT
FAQs
Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations
We found that single-line-log2 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.