{"id":19560627,"url":"https://github.com/zoubin/tick-node","last_synced_at":"2025-07-10T09:38:55.163Z","repository":{"id":57377094,"uuid":"49131852","full_name":"zoubin/tick-node","owner":"zoubin","description":"Print the tick number in debug mode","archived":false,"fork":false,"pushed_at":"2016-01-08T14:46:09.000Z","size":15,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-23T17:15:00.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoubin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-06T11:43:47.000Z","updated_at":"2024-06-13T07:41:30.000Z","dependencies_parsed_at":"2022-09-09T20:30:42.323Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/tick-node","commit_stats":null,"previous_names":["zoubin/debug-nexttick"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/tick-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftick-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftick-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftick-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftick-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/tick-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftick-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264559720,"owners_count":23628040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T05:08:18.651Z","updated_at":"2025-07-10T09:38:55.146Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tick-node\n[![version](https://img.shields.io/npm/v/tick-node.svg)](https://www.npmjs.org/package/tick-node)\n[![status](https://travis-ci.org/zoubin/tick-node.svg?branch=master)](https://travis-ci.org/zoubin/tick-node)\n\nPrint the tick number in debug mode.\n\n## Usage\n\n### Command line\n\n```bash\nnpm install -g tick-node\n\ntick-node -V\n\n```\n\n[example/cli.js](example/cli.js):\n```js\nvar n = 3\n\nvar rs = require('stream').Readable({\n  read: function () {\n    process.nextTick(function (prefix) {\n      if (n) {\n        rs.push(prefix + n-- + '\\n')\n      } else {\n        rs.push(null)\n      }\n    }, 'DATA: ')\n  },\n})\nrs.pipe(process.stdout)\n\n```\n\n**Output**:\n\n```\n⌘ NODE_DEBUG=stream tick-node example/cli.js\nSTREAM 59690: pipe count=1 opts=undefined\nSTREAM 59690: resume\n---------- TICK 1 ----------\nSTREAM 59690: resume read 0\nSTREAM 59690: read 0\nSTREAM 59690: need readable false\nSTREAM 59690: length less than watermark true\nSTREAM 59690: do read\nSTREAM 59690: flow true\nSTREAM 59690: read undefined\nSTREAM 59690: need readable true\nSTREAM 59690: length less than watermark true\nSTREAM 59690: reading or ended false\n---------- TICK 2 ----------\nSTREAM 59690: ondata\nDATA: 3\nSTREAM 59690: read 0\nSTREAM 59690: need readable true\nSTREAM 59690: length less than watermark true\nSTREAM 59690: do read\n---------- TICK 3 ----------\nSTREAM 59690: ondata\nDATA: 2\nSTREAM 59690: read 0\nSTREAM 59690: need readable true\nSTREAM 59690: length less than watermark true\nSTREAM 59690: do read\n---------- TICK 4 ----------\nSTREAM 59690: ondata\nDATA: 1\nSTREAM 59690: read 0\nSTREAM 59690: need readable true\nSTREAM 59690: length less than watermark true\nSTREAM 59690: do read\n---------- TICK 5 ----------\nSTREAM 59690: emitReadable true\nSTREAM 59690: emit readable\nSTREAM 59690: flow true\nSTREAM 59690: read undefined\n---------- TICK 6 ----------\nSTREAM 59690: cleanup\n---------- TICK 7 ----------\n\n```\n\n\n### API\n\n[example/api.js](example/api.js):\n\n```js\nrequire('tick-node').polyfill()\n\nvar n = 3\n\nvar rs = require('stream').Readable({\n  read: function () {\n    process.nextTick(function (prefix) {\n      if (n) {\n        rs.push(prefix + n-- + '\\n')\n      } else {\n        rs.push(null)\n      }\n    }, 'DATA: ')\n  },\n})\nrs.pipe(process.stdout)\n\n```\n\n**Output**\n\n```\n⌘ NODE_DEBUG=stream,nexttick node example/api.js\nSTREAM 59678: pipe count=1 opts=undefined\nSTREAM 59678: resume\n---------- TICK 1 ----------\nSTREAM 59678: resume read 0\nSTREAM 59678: read 0\nSTREAM 59678: need readable false\nSTREAM 59678: length less than watermark true\nSTREAM 59678: do read\nSTREAM 59678: flow true\nSTREAM 59678: read undefined\nSTREAM 59678: need readable true\nSTREAM 59678: length less than watermark true\nSTREAM 59678: reading or ended false\n---------- TICK 2 ----------\nSTREAM 59678: ondata\nDATA: 3\nSTREAM 59678: read 0\nSTREAM 59678: need readable true\nSTREAM 59678: length less than watermark true\nSTREAM 59678: do read\n---------- TICK 3 ----------\nSTREAM 59678: ondata\nDATA: 2\nSTREAM 59678: read 0\nSTREAM 59678: need readable true\nSTREAM 59678: length less than watermark true\nSTREAM 59678: do read\n---------- TICK 4 ----------\nSTREAM 59678: ondata\nDATA: 1\nSTREAM 59678: read 0\nSTREAM 59678: need readable true\nSTREAM 59678: length less than watermark true\nSTREAM 59678: do read\n---------- TICK 5 ----------\nSTREAM 59678: emitReadable true\nSTREAM 59678: emit readable\nSTREAM 59678: flow true\nSTREAM 59678: read undefined\n---------- TICK 6 ----------\nSTREAM 59678: cleanup\n---------- TICK 7 ----------\n\n```\n\n## API\n\n```js\nrequire('tick-node').polyfill()\n\n```\n\n### polyfill(options)\n`process.nextTick` will be hacked to print tick info.\n\n**options.color**\n\nSpecify whether print colorful splitters.\n\nType: `Boolean`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Ftick-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Ftick-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Ftick-node/lists"}