{"id":19560658,"url":"https://github.com/zoubin/stream-tap","last_synced_at":"2025-06-26T11:34:30.233Z","repository":{"id":32470836,"uuid":"36050765","full_name":"zoubin/stream-tap","owner":"zoubin","description":"pause or resume a node stream pipeline","archived":false,"fork":false,"pushed_at":"2015-05-22T07:39:38.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T08:07:25.807Z","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":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-22T03:41:51.000Z","updated_at":"2015-05-22T07:32:42.000Z","dependencies_parsed_at":"2022-08-07T17:31:20.732Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/stream-tap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zoubin/stream-tap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fstream-tap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fstream-tap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fstream-tap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fstream-tap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/stream-tap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fstream-tap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262056508,"owners_count":23251688,"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:23.644Z","updated_at":"2025-06-26T11:34:30.187Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stream-tap\nTo control (pause or resume) a node stream pipeline. It returns a transform which is supposed to be included into a stream pipeline.\n\n## Usage\n\n```javascript\nvar Tap = require('stream-tap');\nvar tap = Tap();\n```\n\n### tap = Tap()\nReturn the tap transform.\n\n### tap.turnOn()\n`tap` will push no data, until `tap.turnOn()` is called.\n\n### tap.turnOff()\nMake `tap` collect data, and wait for `tap.turnOn` to flush.\n\n## Example\n\n```javascript\nvar Tap = require('stream-tap');\nvar thr = require('through2');\n\nvar s1 = thr();\nvar s2 = thr();\nvar tap = Tap();\n\ns1.pipe(tap).pipe(s2).pipe(process.stdout);\n\nprocess.stdout.write('Writing into the pipeline\\n');\n[1,2,3,4,5].map(String).forEach(s1.write, s1);\ns1.end();\nprocess.stdout.write('Writing end\\n');\nsetTimeout(function() {\n    process.stdout.write('turn tap on\\n');\n    tap.turnOn();\n}, 50);\n```\n\noutput:\n\n```\n⌘ node example/tap.js\nWriting into the pipeline\nWriting end\nturn tap on\n12345\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fstream-tap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fstream-tap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fstream-tap/lists"}