{"_id":"lead","_rev":"3943905","name":"lead","description":"Sink your streams.","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"time":{"modified":"2025-09-01T01:32:42.000Z","created":"2014-10-28T09:22:25.130Z","4.0.0":"2022-09-22T20:19:19.769Z","3.0.0":"2020-04-29T00:06:28.473Z","2.0.0":"2020-04-28T05:37:06.871Z","1.0.0":"2017-04-28T17:58:35.397Z","0.0.0":"2014-10-28T09:22:25.130Z"},"users":{},"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"repository":{"type":"git","url":"git+https://github.com/gulpjs/lead.git"},"versions":{"4.0.0":{"name":"lead","version":"4.0.0","description":"Sink your streams.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/lead.git"},"license":"MIT","engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{},"devDependencies":{"eslint":"^7.32.0","eslint-config-gulp":"^5.0.1","eslint-plugin-node":"^11.1.0","expect":"^27.4.2","mocha":"^8.4.0","nyc":"^15.1.0","readable-stream":"^3.6.0","streamx":"^2.12.0"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["streams","sink","through","writeable"],"gitHead":"a14cfb851efd699c15c2f97bbb83ddc9e2774e61","bugs":{"url":"https://github.com/gulpjs/lead/issues"},"homepage":"https://github.com/gulpjs/lead#readme","_id":"lead@4.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.11.0","dist":{"shasum":"5317a49effb0e7ec3a0c8fb9c1b24fb716aab939","size":2353,"noattachment":false,"key":"/lead/-/lead-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lead/download/lead-4.0.0.tgz"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lead_4.0.0_1663877959597_0.41233532910611137"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-22T20:21:27.628Z","publish_time":1663877959769,"_cnpm_publish_time":1663877959769},"3.0.0":{"name":"lead","version":"3.0.0","description":"Sink your streams.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/lead.git"},"license":"MIT","engines":{"node":">= 10"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{"streamx":"^2.6.0"},"devDependencies":{"eslint":"^6.8.0","eslint-config-gulp":"^4.0.0","expect":"^25.4.0","mississippi":"^1.3.0","mocha":"^7.1.2","nyc":"^15.0.1"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["streams","sink","through","writeable"],"gitHead":"a378277afa572de80ee215ea4d9d5279a887843a","bugs":{"url":"https://github.com/gulpjs/lead/issues"},"homepage":"https://github.com/gulpjs/lead#readme","_id":"lead@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"dist":{"shasum":"3bb1c673f7042d8f48bb33602bdcb127f3ad5e82","size":2384,"noattachment":false,"key":"/lead/-/lead-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lead/download/lead-3.0.0.tgz"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lead_3.0.0_1588118788309_0.3506423826732592"},"_hasShrinkwrap":false,"publish_time":1588118788473,"_cnpm_publish_time":1588118788473},"2.0.0":{"name":"lead","version":"2.0.0","description":"Sink your streams.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/lead.git"},"license":"MIT","engines":{"node":">= 10"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{"flush-write-stream":"^2.0.0"},"devDependencies":{"eslint":"^6.8.0","eslint-config-gulp":"^4.0.0","expect":"^25.4.0","mississippi":"^1.3.0","mocha":"^7.1.2","nyc":"^15.0.1"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["streams","sink","through","writeable"],"gitHead":"d93637ddedc83bf79ed3df5932233b49f528b3cd","bugs":{"url":"https://github.com/gulpjs/lead/issues"},"homepage":"https://github.com/gulpjs/lead#readme","_id":"lead@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"dist":{"shasum":"9d9e4c5551ccad836a8622233a4a570f76fffe1e","size":2454,"noattachment":false,"key":"/lead/-/lead-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lead/download/lead-2.0.0.tgz"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lead_2.0.0_1588052226700_0.8590481145126618"},"_hasShrinkwrap":false,"publish_time":1588052226871,"_cnpm_publish_time":1588052226871},"1.0.0":{"name":"lead","version":"1.0.0","description":"Sink your streams.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/lead.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint index.js test/ && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"flush-write-stream":"^1.0.2"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0"},"keywords":["streams","sink","through","writeable"],"gitHead":"76ad327e216f34cf93fee45f32dde9f158bf8b2c","bugs":{"url":"https://github.com/gulpjs/lead/issues"},"homepage":"https://github.com/gulpjs/lead#readme","_id":"lead@1.0.0","_shasum":"6f14f99a37be3a9dd784f5495690e5903466ee42","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"6f14f99a37be3a9dd784f5495690e5903466ee42","size":2519,"noattachment":false,"key":"/lead/-/lead-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lead/download/lead-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/lead-1.0.0.tgz_1493402313547_0.1040902694221586"},"directories":{},"publish_time":1493402315397,"_hasShrinkwrap":false,"_cnpm_publish_time":1493402315397},"0.0.0":{"name":"lead","version":"0.0.0","description":"Minecraft forward server","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/k2wanko/lead.git"},"keywords":["minecraft","forward","tcp"],"author":{"name":"k2wanko"},"license":"MIT","bugs":{"url":"https://github.com/k2wanko/lead/issues"},"homepage":"https://github.com/k2wanko/lead","_id":"lead@0.0.0","_shasum":"725613bc6e3a29f7b9dc1cded0ae003224d33ce5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"k2wanko","email":"k2.wanko@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"725613bc6e3a29f7b9dc1cded0ae003224d33ce5","size":363,"noattachment":false,"key":"/lead/-/lead-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lead/download/lead-0.0.0.tgz"},"directories":{},"publish_time":1414488145130,"_cnpm_publish_time":1414488145130,"_hasShrinkwrap":false}},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\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<!-- prettier-ignore-start -->\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/workflow/status/gulpjs/lead/dev?style=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<!-- prettier-ignore-end -->\n","_attachments":{},"homepage":"https://github.com/gulpjs/lead#readme","bugs":{"url":"https://github.com/gulpjs/lead/issues"},"license":"MIT"}