{"name":"mute-stream","version":"0.0.8","keywords":["mute","stream","pipe"],"author":{"url":"http://blog.izs.me/","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"ISC","_id":"mute-stream@0.0.8","maintainers":[{"name":"iarna","email":"me@re-becca.org"},{"name":"isaacs","email":"i@izs.me"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"},{"name":"zkat","email":"kzm@sykosomatic.org"}],"homepage":"https://github.com/isaacs/mute-stream#readme","bugs":{"url":"https://github.com/isaacs/mute-stream/issues"},"dist":{"shasum":"1630c42b2251ff81e2a283de96a5497ea92e5e0d","tarball":"http://registry-npm.ywwl.com/mute-stream/download/mute-stream-0.0.8.tgz","fileCount":4,"integrity":"sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==","signatures":[{"sig":"MEUCIQCh2CHiqULsLgnmjxCATwOLvXccp8mn6oIOm36bav7SUgIgBeu7wU0PXjpt66tpeqa+mss/rYpOjdr2ASk8zp2JIsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJbNmCRA9TVsSAnZWagAAqWAQAKPRVoWEA71FOyJZI74r\nk9WXeZXrDhrMvS1flnEwZOvZH8h6WcJJ5549mgcVQynEhlQkXW4+UP/sdheG\nBjW7ALN9HCTKqCirBbUyB0hRWIqvNXEsO4D00wu+kcrqOWLc20sNGpmweoow\nrIuwvTD3tdbbZl5HgXsxSVoescg6vRWIU+iNJps9W7bzZXOwGtl1nHHnQ47T\nXuK3OlS6adaBMdtO1LFkDgRdE9Ez5TGSwvAk8siEym7ypVnnUlia43ocAsks\nFvgcq9duPjwJFFwJTzlwX87w4eWY0Y2LVc19iwNXqv49V8pM0JhBXO4OGHFa\nKaRGtbBqN75GlYuzzUNfekPKE1/32tnVxywjFScLzYhruzLHvxhFESDSuptv\ny6ZGWl2v8+TLTRhRpuBPIEuezBS2CdcAvKDLAAsM6mjxyfzfee13cSGzgf/c\nh5Fl179EZE/KnXko9y7GeMXMKsBYzup+pWb2knzFzhR79hb8vjqX/kqffVV7\nz8Igu7YRfzyIRl/ju2MU/mf7HjoIEO+PG6tdiGzr5DnjxFa7A2cWxSInmHyq\nOBqPlWJ7iqRsEv+Ubc+cjdM3oSAlOiizcbwnKAPmDoD8PZsRO7fYNB8pCvBh\nR8/8DIueC5ZN3lrVd+EWhELXVkPWrQHyAzAmtzpF0CrrxXrS1JMjd+ZhbDWF\nWW4l\r\n=SOUD\r\n-----END PGP SIGNATURE-----\r\n","size":2663,"noattachment":false,"key":"/mute-stream/-/mute-stream-0.0.8.tgz"},"main":"mute.js","gitHead":"aa4a4baeaff5eeec83b5717738a44642f6948a9f","scripts":{"test":"tap test/*.js --cov"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"repository":{"url":"git://github.com/isaacs/mute-stream.git","type":"git"},"_npmVersion":"6.5.0","description":"Bytes go in, but they don't come out (when muted).","directories":{"test":"test"},"_nodeVersion":"10.12.0","_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/mute-stream_0.0.8_1545974629018_0.7215891164233619","host":"s3://npm-registry-packages"},"readme":"# mute-stream\n\nBytes go in, but they don't come out (when muted).\n\nThis is a basic pass-through stream, but when muted, the bytes are\nsilently dropped, rather than being passed through.\n\n## Usage\n\n```javascript\nconst MuteStream = require('mute-stream')\n\nconst ms = new MuteStream(options)\n\nms.pipe(process.stdout)\nms.write('foo') // writes 'foo' to stdout\nms.mute()\nms.write('bar') // does not write 'bar'\nms.unmute()\nms.write('baz') // writes 'baz' to stdout\n\n// can also be used to mute incoming data\nconst ms = new MuteStream\ninput.pipe(ms)\n\nms.on('data', function (c) {\n  console.log('data: ' + c)\n})\n\ninput.emit('data', 'foo') // logs 'foo'\nms.mute()\ninput.emit('data', 'bar') // does not log 'bar'\nms.unmute()\ninput.emit('data', 'baz') // logs 'baz'\n```\n\n## Options\n\nAll options are optional.\n\n* `replace` Set to a string to replace each character with the\n  specified string when muted.  (So you can show `****` instead of the\n  password, for example.)\n\n* `prompt` If you are using a replacement char, and also using a\n  prompt with a readline stream (as for a `Password: *****` input),\n  then specify what the prompt is so that backspace will work\n  properly.  Otherwise, pressing backspace will overwrite the prompt\n  with the replacement character, which is weird.\n\n## ms.mute()\n\nSet `muted` to `true`.  Turns `.write()` into a no-op.\n\n## ms.unmute()\n\nSet `muted` to `false`\n\n## ms.isTTY\n\nTrue if the pipe destination is a TTY, or if the incoming pipe source is\na TTY.\n\n## Other stream methods...\n\nThe other standard readable and writable stream methods are all\navailable.  The MuteStream object acts as a facade to its pipe source\nand destination.\n","publish_time":1545974629143,"_cnpm_publish_time":1545974629143,"dist-tags":{"latest":"4.0.0"}}