{"_id":"peekaboo","_rev":"25-774216774ba70ef889382c0a1c512bd0","name":"peekaboo","description":"Peekable transform stream","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"peekaboo","description":"Peekable transform stream","version":"1.0.0","repository":{"type":"git","url":"git://github.com/hapijs/peekaboo"},"main":"index","keywords":["stream","transform","peek"],"engines":{"node":">=0.10.32"},"dependencies":{},"devDependencies":{"code":"1.x.x","lab":"5.x.x"},"scripts":{"test":"make test-cov"},"licenses":[{"type":"BSD","url":"http://github.com/hapijs/peekaboo/raw/master/LICENSE"}],"gitHead":"c8dcda2e0c2e8046eef647286bb7c2554ab4f03a","bugs":{"url":"https://github.com/hapijs/peekaboo/issues"},"homepage":"https://github.com/hapijs/peekaboo","_id":"peekaboo@1.0.0","_shasum":"c0db2926ad654d2ca01f7ca650ab4591a764fc42","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"hueniverse","email":"eran@hueniverse.com"},"maintainers":[{"name":"hueniverse","email":"eran@hueniverse.com"}],"dist":{"shasum":"c0db2926ad654d2ca01f7ca650ab4591a764fc42","tarball":"https://registry.npmjs.org/peekaboo/-/peekaboo-1.0.0.tgz","integrity":"sha512-iqwB77z9VbRdHkBKt/MiwsARis45Jv8XO4Sm/So7yncwyDOtcd8wVglpLmQZQr5I4Ux/B2u+NIKNaEtBIOSvwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP4RX3V6aT844nMszJ5qzGnq/ybH5lsQlCAKa5sFKBhgIgY8lNpN52q5vyw0YKONlxy7+BZgEXWc4DbE6p/h6IjIQ="}]},"directories":{},"deprecated":"This module is no longer maintained."},"2.0.0":{"name":"peekaboo","description":"Peekable transform stream","version":"2.0.0","repository":{"type":"git","url":"git://github.com/hapijs/peekaboo.git"},"main":"lib/index.js","keywords":["stream","transform","peek"],"engines":{"node":">=4.0.0"},"dependencies":{},"devDependencies":{"code":"2.x.x","lab":"7.x.x"},"scripts":{"test":"lab -a code -t 100 -L","test-cov-html":"lab -a code -r html -o coverage.html"},"license":"BSD-3-Clause","gitHead":"a54ccbab2ac3434b2afb09b24de8e14c9797df91","bugs":{"url":"https://github.com/hapijs/peekaboo/issues"},"homepage":"https://github.com/hapijs/peekaboo#readme","_id":"peekaboo@2.0.0","_shasum":"8a54bbd68edeb0cb5b3144991e1535d2d492dc97","_from":".","_npmVersion":"3.3.9","_nodeVersion":"4.2.1","_npmUser":{"name":"hueniverse","email":"eran@hammer.io"},"dist":{"shasum":"8a54bbd68edeb0cb5b3144991e1535d2d492dc97","tarball":"https://registry.npmjs.org/peekaboo/-/peekaboo-2.0.0.tgz","integrity":"sha512-wlrNsxEQj83puzfMxY2k6HfelDM+HHIWZDI+49LeD1YrvQXOA1z+Pdh7vAtePvoevA+Xb1yhBjGL9KG5P8w8nQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/4V9whEC9+EpGhqMd/yXvUX2/4f8aWwpa4lJWTT++/gIhAMqduvFnwkoiK4psKaKNEyQycibyBpk2OBANxI1chIo2"}]},"maintainers":[{"name":"hueniverse","email":"eran@hueniverse.com"}],"directories":{},"deprecated":"This module is no longer maintained."},"2.0.1":{"name":"peekaboo","description":"Peekable transform stream","version":"2.0.1","repository":{"type":"git","url":"git://github.com/hapijs/peekaboo.git"},"main":"lib/index.js","keywords":["stream","transform","peek"],"engines":{"node":">=4.0.0"},"dependencies":{},"devDependencies":{"code":"2.x.x","lab":"10.x.x"},"scripts":{"test":"lab -a code -t 100 -L","test-cov-html":"lab -a code -r html -o coverage.html"},"license":"BSD-3-Clause","gitHead":"0f2963a4e4a1b8d989efe2e98ee0776626fb5db3","bugs":{"url":"https://github.com/hapijs/peekaboo/issues"},"homepage":"https://github.com/hapijs/peekaboo#readme","_id":"peekaboo@2.0.1","_shasum":"1105f1a2eaae5d8fe9f089f6fee9a6602a82b2eb","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"hueniverse","email":"eran@hammer.io"},"dist":{"shasum":"1105f1a2eaae5d8fe9f089f6fee9a6602a82b2eb","tarball":"https://registry.npmjs.org/peekaboo/-/peekaboo-2.0.1.tgz","integrity":"sha512-dcdbqVM7RNHTF2vk/bOomMf5aewBHxOdwjDh3YkGLuvicuFWZyFOBeP57sb/pLCEgNy8RJkbAJuTi+5oN+z9+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEADnlBJ0NqACCXCe7latZI/xmkZPJq8qqFeMfzOgaDtAiEAyTEY2vPrytJmghCBXcz2O/nD18jgmzHNtalzltEJzz0="}]},"maintainers":[{"name":"hueniverse","email":"eran@hueniverse.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/peekaboo-2.0.1.tgz_1463793999671_0.18604592606425285"},"directories":{},"deprecated":"This module is no longer maintained."},"2.0.2":{"name":"peekaboo","description":"Peekable transform stream","version":"2.0.2","repository":{"type":"git","url":"git://github.com/hapijs/peekaboo.git"},"main":"lib/index.js","keywords":["stream","transform","peek"],"engines":{"node":">=4.0.0"},"dependencies":{},"devDependencies":{"code":"3.x.x","lab":"10.x.x"},"scripts":{"test":"lab -a code -t 100 -L","test-cov-html":"lab -a code -r html -o coverage.html"},"license":"BSD-3-Clause","gitHead":"feef479470224dea028fc2b9641d2e5fc83b1287","bugs":{"url":"https://github.com/hapijs/peekaboo/issues"},"homepage":"https://github.com/hapijs/peekaboo#readme","_id":"peekaboo@2.0.2","_shasum":"fc42e139efd698c6ff2870a6b20c047cd9aa29ff","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"hueniverse","email":"eran@hammer.io"},"dist":{"shasum":"fc42e139efd698c6ff2870a6b20c047cd9aa29ff","tarball":"https://registry.npmjs.org/peekaboo/-/peekaboo-2.0.2.tgz","integrity":"sha512-03oANp8v4y8qy5PV5AxFYjxhCtcTdQcvep5QefkC1301mxM2hvTlHZTCwoNMiZWlv67bNw4AJYhaEd43qc31Zw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp/Pj9v/tMaNh3NEOlIJ6qjnsGZNe2Jc7yzyrx6ZT8WQIgV7Kl7d/a0sc9rChjGg1Wvj6UgcpjWiGmSMPlMlq4ECo="}]},"maintainers":[{"name":"hueniverse","email":"eran@hueniverse.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/peekaboo-2.0.2.tgz_1469732885115_0.2340644036885351"},"directories":{},"deprecated":"This module is no longer maintained."}},"readme":"#peekaboo\r\n\r\nA Peekable node stream.\r\n\r\nA Peekaboo stream works just like a `PassThrough` stream, it can be piped to and from without any transformation of the chunks. The difference is that a Peekaboo stream will emit each chunk as a `peek` event on an EventEmitter of your choosing, letting you spy on stream chunks in an uninvasive way.\r\n\r\n[![Build Status](https://secure.travis-ci.org/hapijs/peekaboo.png)](http://travis-ci.org/hapijs/peekaboo)\r\n\r\nLead Maintainer - [Eran Hammer](https://github.com/hueniverse)\r\n\r\n## Example\r\n\r\nWe can report the download process of a request by peeking on response stream events:\r\n\r\n```javascript\r\n'use strict';\r\n\r\nconst Events = require('events');\r\nconst Fs = require('fs');\r\nconst Https = require('https');\r\nconst Peekaboo = require('peekaboo');\r\n\r\nconst emitter = new Events.EventEmitter();\r\nconst peek = new Peekaboo(emitter);\r\n\r\nHttps.get('https://codeload.github.com/hapijs/hapi/zip/master', (res) => {\r\n\r\n    res.pipe(peek).pipe(Fs.createWriteStream('./hapi.zip'));\r\n\r\n    let downloaded = 0;\r\n    emitter.on('peek', (chunk) => {\r\n\r\n        downloaded += chunk.length;\r\n        const pct = (downloaded / res.headers['content-length'] * 100).toFixed(1);\r\n        process.stdout.write(pct + '% downloaded\\r');\r\n    });\r\n});\r\n```\r\n","maintainers":[{"email":"jonas.pauthier@gmail.com","name":"nargonath"},{"email":"devinivy@gmail.com","name":"devinivy"},{"email":"nicolas@morel.io","name":"marsup"},{"email":"quitlahok@gmail.com","name":"nlf"}],"time":{"modified":"2023-12-01T08:26:36.852Z","created":"2014-11-08T03:29:27.741Z","1.0.0":"2014-11-08T03:29:27.741Z","2.0.0":"2015-11-02T05:36:38.161Z","2.0.1":"2016-05-21T01:26:40.106Z","2.0.2":"2016-07-28T19:08:05.338Z"},"homepage":"https://github.com/hapijs/peekaboo#readme","keywords":["stream","transform","peek"],"repository":{"type":"git","url":"git://github.com/hapijs/peekaboo.git"},"bugs":{"url":"https://github.com/hapijs/peekaboo/issues"},"readmeFilename":"README.md","license":"BSD-3-Clause","users":{"simone.sanfra":true}}