
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
debug-nexttick
Advanced tools
Print the tick number in debug mode.
npm install -g debug-nexttick
tick-node -V
var n = 3
var rs = require('stream').Readable({
read: function () {
process.nextTick(function (prefix) {
if (n) {
rs.push(prefix + n-- + '\n')
} else {
rs.push(null)
}
}, 'DATA: ')
},
})
rs.pipe(process.stdout)
Output:
⌘ NODE_DEBUG=stream tick-node example/cli.js
STREAM 59690: pipe count=1 opts=undefined
STREAM 59690: resume
---------- TICK 1 ----------
STREAM 59690: resume read 0
STREAM 59690: read 0
STREAM 59690: need readable false
STREAM 59690: length less than watermark true
STREAM 59690: do read
STREAM 59690: flow true
STREAM 59690: read undefined
STREAM 59690: need readable true
STREAM 59690: length less than watermark true
STREAM 59690: reading or ended false
---------- TICK 2 ----------
STREAM 59690: ondata
DATA: 3
STREAM 59690: read 0
STREAM 59690: need readable true
STREAM 59690: length less than watermark true
STREAM 59690: do read
---------- TICK 3 ----------
STREAM 59690: ondata
DATA: 2
STREAM 59690: read 0
STREAM 59690: need readable true
STREAM 59690: length less than watermark true
STREAM 59690: do read
---------- TICK 4 ----------
STREAM 59690: ondata
DATA: 1
STREAM 59690: read 0
STREAM 59690: need readable true
STREAM 59690: length less than watermark true
STREAM 59690: do read
---------- TICK 5 ----------
STREAM 59690: emitReadable true
STREAM 59690: emit readable
STREAM 59690: flow true
STREAM 59690: read undefined
---------- TICK 6 ----------
STREAM 59690: cleanup
---------- TICK 7 ----------
require('debug-nexttick').polyfill()
var n = 3
var rs = require('stream').Readable({
read: function () {
process.nextTick(function (prefix) {
if (n) {
rs.push(prefix + n-- + '\n')
} else {
rs.push(null)
}
}, 'DATA: ')
},
})
rs.pipe(process.stdout)
Output
⌘ NODE_DEBUG=stream,nexttick node example/api.js
STREAM 59678: pipe count=1 opts=undefined
STREAM 59678: resume
---------- TICK 1 ----------
STREAM 59678: resume read 0
STREAM 59678: read 0
STREAM 59678: need readable false
STREAM 59678: length less than watermark true
STREAM 59678: do read
STREAM 59678: flow true
STREAM 59678: read undefined
STREAM 59678: need readable true
STREAM 59678: length less than watermark true
STREAM 59678: reading or ended false
---------- TICK 2 ----------
STREAM 59678: ondata
DATA: 3
STREAM 59678: read 0
STREAM 59678: need readable true
STREAM 59678: length less than watermark true
STREAM 59678: do read
---------- TICK 3 ----------
STREAM 59678: ondata
DATA: 2
STREAM 59678: read 0
STREAM 59678: need readable true
STREAM 59678: length less than watermark true
STREAM 59678: do read
---------- TICK 4 ----------
STREAM 59678: ondata
DATA: 1
STREAM 59678: read 0
STREAM 59678: need readable true
STREAM 59678: length less than watermark true
STREAM 59678: do read
---------- TICK 5 ----------
STREAM 59678: emitReadable true
STREAM 59678: emit readable
STREAM 59678: flow true
STREAM 59678: read undefined
---------- TICK 6 ----------
STREAM 59678: cleanup
---------- TICK 7 ----------
require('debug-nexttick').polyfill()
process.nextTick
will be hacked to print tick info.
options.color
Specify whether print colorful splitters.
Type: Boolean
FAQs
Print the tick number in debug mode
We found that debug-nexttick 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.