{"name":"@ljharb/through","version":"2.3.14","description":"simplified stream construction","main":"index.js","types":"./through.d.ts","sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@\">= 10.2\" audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"dependencies":{"call-bind":"^1.0.8"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.3","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.3","@types/call-bind":"^1.0.5","@types/node":"^0.12.25","@types/tape":"^5.8.1","auto-changelog":"^2.5.0","encoding":"^0.1.13","eslint":"=8.8.0","from":"^0.1.7","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","stream-spec":"^0.3.6","tape":"^5.9.0","typescript":"next"},"keywords":["stream","streams","user-streams","pipe"],"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"dominictarr.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ljharb/through.git"},"homepage":"https://github.com/ljharb/through","testling":{"files":"test/*.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true,"startingVersion":"2.3.9"},"publishConfig":{"ignore":[".github/workflows"]},"_id":"@ljharb/through@2.3.14","gitHead":"66623a329608e3d918207edc678f47269424846b","bugs":{"url":"https://github.com/ljharb/through/issues"},"_nodeVersion":"23.7.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==","shasum":"a5df44295f44dc23bfe106af59426dd0677760b1","tarball":"http://registry-npm.ywwl.com/@ljharb/through/download/@ljharb/through-2.3.14.tgz","fileCount":15,"unpackedSize":32740,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3gl1WdNuGEvj4BUdTPmjWvc9uXq1apap73u5SHhffEwIgYr6Qos1fi/3tsr9OMQV39ALEpJXyAGdhUReq5u3dDog="}],"size":10861,"noattachment":false,"key":"/@ljharb/through/-/@ljharb/through-2.3.14.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/through_2.3.14_1738992532127_0.6154772206133656"},"_hasShrinkwrap":false,"readme":"# @ljharb/through <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n*Note*: This package is a fork of https://npmjs.com/through, and builds off of it.\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nEasy way to create a `Stream` that is both `readable` and `writable`.\n\n* Pass in optional `write` and `end` methods.\n* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`.\n* Use `this.pause()` and `this.resume()` to manage flow.\n* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`).\n\nThis function is the basis for most of the synchronous streams in [event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('@ljharb/through')\n\nthrough(function write(data) {\n    this.queue(data) //data *must* not be null\n  },\n  function end () { //optional\n    this.queue(null)\n  })\n```\n\nOr, can also be used _without_ buffering on pause, use `this.emit('data', data)`,\nand this.emit('end')\n\n``` js\nvar through = require('@ljharb/through')\n\nthrough(function write(data) {\n    this.emit('data', data)\n    //this.pause()\n  },\n  function end () { //optional\n    this.emit('end')\n  })\n```\n\n## Extended Options\n\nYou will probably not need these 99% of the time.\n\n### autoDestroy=false\n\nBy default, `through` emits close when the writable\nand readable side of the stream has ended.\nIf that is not desired, set `autoDestroy=false`.\n\n``` js\nvar through = require('@ljharb/through')\n\n//like this\nvar ts = through(write, end, {autoDestroy: false})\n//or like this\nvar ts = through(write, end)\nts.autoDestroy = false\n```\n\n[package-url]: https://npmjs.org/package/@ljharb/through\n[npm-version-svg]: https://versionbadg.es/ljharb/through.svg\n[deps-svg]: https://david-dm.org/ljharb/through.svg\n[deps-url]: https://david-dm.org/ljharb/through\n[dev-deps-svg]: https://david-dm.org/ljharb/through/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/through#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/@ljharb/through.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/@ljharb/through.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/@ljharb/through.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=@ljharb/through\n[codecov-image]: https://codecov.io/gh/ljharb/through/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/through/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/through\n[actions-url]: https://github.com/ljharb/through/actions\n","publish_time":1738992532320,"_cnpm_publish_time":1738992532320,"dist-tags":{"latest":"2.3.14"}}