{"id":14982061,"url":"https://github.com/gulpjs/lead","last_synced_at":"2025-10-19T11:31:21.307Z","repository":{"id":20350916,"uuid":"89538366","full_name":"gulpjs/lead","owner":"gulpjs","description":"Sink your streams.","archived":false,"fork":false,"pushed_at":"2023-04-15T22:03:42.000Z","size":15,"stargazers_count":17,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T15:14:39.810Z","etag":null,"topics":["flowing","gulp","gulpjs","stream","writable-streams"],"latest_commit_sha":null,"homepage":"","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/gulpjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["gulpjs","phated","yocontra"],"tidelift":"npm/gulp","open_collective":"gulpjs"}},"created_at":"2017-04-27T00:25:16.000Z","updated_at":"2023-11-05T01:09:35.000Z","dependencies_parsed_at":"2022-09-05T16:51:45.462Z","dependency_job_id":"aefd22ce-ccf2-4ab3-86d8-be8cdddf0aa9","html_url":"https://github.com/gulpjs/lead","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":0.2777777777777778,"last_synced_commit":"aca2300c9f492baf561872b48a2a13cbc9e80c45"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Flead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Flead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Flead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gulpjs%2Flead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gulpjs","download_url":"https://codeload.github.com/gulpjs/lead/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236572364,"owners_count":19170805,"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":["flowing","gulp","gulpjs","stream","writable-streams"],"created_at":"2024-09-24T14:04:43.256Z","updated_at":"2025-10-19T11:31:16.274Z","avatar_url":"https://github.com/gulpjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gulpjs","https://github.com/sponsors/phated","https://github.com/sponsors/yocontra","https://tidelift.com/funding/github/npm/gulp","https://opencollective.com/gulpjs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gulpjs.com\"\u003e\n    \u003cimg height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# lead\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nSink your streams.\n\n## Usage\n\n```js\nvar { Readable, Transform } = require('streamx');\nvar sink = require('lead');\n\n// Might be used as a Transform or Writeable\nvar maybeThrough = new Transform({\n  transform(chunk, cb) {\n    // processing\n    cb(null, chunk);\n  },\n});\n\nReadable.from(['hello', 'world'])\n  // Sink it to behave like a Writeable\n  .pipe(sink(maybeThrough));\n```\n\n## API\n\n### `sink(stream)`\n\nTakes a `stream` to sink and returns the same stream. Sets up event listeners to infer if the stream is being used as a `Transform` or `Writeable` stream and sinks it on `nextTick` if necessary. If the stream is being used as a `Transform` stream but becomes unpiped, it will be sunk. Respects `pipe`, `on('data')` and `on('readable')` handlers.\n\n## License\n\nMIT\n\n\u003c!-- prettier-ignore-start --\u003e\n[downloads-image]: https://img.shields.io/npm/dm/lead.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/lead\n[npm-image]: https://img.shields.io/npm/v/lead.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/lead/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/lead/dev.yml?branch=master\u0026style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/lead\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/lead/master.svg?style=flat-square\n\u003c!-- prettier-ignore-end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Flead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgulpjs%2Flead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgulpjs%2Flead/lists"}