{"_id":"stream-source","_rev":"15-2f82936c909433f1cf3d777d0e239c09","name":"stream-source","description":"Read binary streams in chunks, on demand, with promises.","dist-tags":{"latest":"0.3.5"},"versions":{"0.0.1":{"name":"stream-source","version":"0.0.1","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"415d4f12dcb5291215f8424bd9b2540610280491","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.0.1","_shasum":"e6ec2cb472014726bea85321f144bf6fac5caf01","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mbostock@gmail.com"}],"dist":{"shasum":"e6ec2cb472014726bea85321f144bf6fac5caf01","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.0.1.tgz","integrity":"sha512-LMYHvrbdAkYubgNITEXxIWvVkf9m03HHWSeogN8wlleqkJksakYaNfIxEe/4iFpKq5T+mzGkpmpIA3JNbCMAKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqYPYCdQ7t6O/8SpL+RVHaPGc99Lul7xJwnxCzMthoTgIhALDmHXR91pVXRz5sbtGFPq10EpBHOSqqJl2x7FYYFPe7"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stream-source-0.0.1.tgz_1472857590053_0.3913856919389218"}},"0.0.2":{"name":"stream-source","version":"0.0.2","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"8f022a30a6fc919f7a243c929e746cd9e382d05c","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.0.2","_shasum":"6b8caaa4a0cc1109f8f4e6acce90ceeb0a2b38be","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"6b8caaa4a0cc1109f8f4e6acce90ceeb0a2b38be","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.0.2.tgz","integrity":"sha512-aWITlpGmDzObtv+3fTZOkHG8CZGa3FAiEtKatZfP3OF5x8Xvc7SlebMTC2j1wWeg6EfmRvc8DS31Osw8Uoi6+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzL+0FmQfn0Lvtce67Q3gYGLk7yFuXfNx3rFfttS/85wIgb7o3Bh/1ssfpXtaGyj0sOgHy/JXM5e9CXO4PEQNuWIA="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stream-source-0.0.2.tgz_1473037172366_0.24143109912984073"}},"0.1.0":{"name":"stream-source","version":"0.1.0","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"f88787739962367ee45923b79fd576f97420f509","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.1.0","_shasum":"f2dd9b76aa50458eb66ba7b271e3c05319497803","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"f2dd9b76aa50458eb66ba7b271e3c05319497803","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.1.0.tgz","integrity":"sha512-rCVmKF5wXdvqwoP/FNCaAgmtbx1od7+3ZuIAQEfcqhveGEUz8bVD6HoIdIzbXJ4uSCQfU7rBySVRofJd+V/9vg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsomwGRpFM7fhitXyH74qryQtAfkWljnacBGj/EOv/uQIhALtxfjFWHvBx08T2EhHRb8EFcUceIEG4NInTwNQlZjTk"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stream-source-0.1.0.tgz_1473106314737_0.5591677254997194"}},"0.2.0":{"name":"stream-source","version":"0.2.0","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"bd9a49a7db05d36250d02b0b921a74fc6d9f3548","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.2.0","_shasum":"a6796368ca754d9e066ee96502589e8efb42ab77","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"a6796368ca754d9e066ee96502589e8efb42ab77","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.2.0.tgz","integrity":"sha512-locayMB3G6HVQUPBF4WdDMH3PHQ/KgOkNeuy+3GCFjyxX5JpQZ49zupNaan/x0eOEJQyoJR9a8Djv1WTpBpfhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmOGoL5zIzrW+Wx95Q0fcwRMON5ODw6CgtL15qIGCjkAiAOVG6UuF6t4bq9e90Gcdtq53UtQVHiQvitI98oISdGsQ=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.2.0.tgz_1473185551590_0.8264186934102327"}},"0.2.1":{"name":"stream-source","version":"0.2.1","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"ad46dab5e50614a6a8bb09550cca2b8e7c12c69c","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.2.1","_shasum":"8f01adbcc5ae00fde4d8beb9fa5bfb0a72161760","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"8f01adbcc5ae00fde4d8beb9fa5bfb0a72161760","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.2.1.tgz","integrity":"sha512-+PJLH8RFKx6UALZjedN6mNja5aBwyEwy6n1JmxBeS1ChLZYNwzDzaXt6Ca1pHLw2CZspM9sUqraokYwNTUkzPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1SPoJlXpKPk80GS0COVl6ncxwWEZykf5H8zrFJVM1NwIhAN4BcssCUShm/ohcS6Q8T+L9oKEhrePHfzT6s0TFGSg0"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.2.1.tgz_1473207519907_0.4298704795073718"}},"0.2.2":{"name":"stream-source","version":"0.2.2","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"797dc53a8b0a97f31c2794cdc1e8932cab792a8a","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.2.2","_shasum":"5965356ef4d0817a43fdc94a7e9e2b87f74daf71","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"5965356ef4d0817a43fdc94a7e9e2b87f74daf71","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.2.2.tgz","integrity":"sha512-5tJep0v5f7FnKAVSuVTne+SUzdHDL2AoGoIe7Tws946FCcIUfR4PPyELwRSp9RABBuCMGdFwK+UKioH/2Cn0Dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTzLGN1LuZF/WbwmKrOK1E60g5CjTn5c97EXl1VJFVhAIgf5MtM9AqgDk9el16KEyUpzGBfgkdKWU38Y8dObWtJQg="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.2.2.tgz_1473208302447_0.40499555482529104"}},"0.3.0":{"name":"stream-source","version":"0.3.0","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"44d866439e607f1ec50cec180ef3cc45b4879da2","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.0","_shasum":"8e73391e40958394e6be988d85f5bf559f7e2d41","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"8e73391e40958394e6be988d85f5bf559f7e2d41","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.0.tgz","integrity":"sha512-U1OZNdcP7B1LcH8p06SfPT7ADsz3eaTOGjcp50qE/EZv/onYWEopeAcD4uwi3BWX83KL/sFdST9srktnmmkP2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyNFp9IKGcSsDySm+AQyJErwTY8hDORggsOrLrK60NNAIhAMg1WB1gSPYCfE9qGMhWtsCWd112Y3NJz9OCaK1E3x2u"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.3.0.tgz_1473267312458_0.7231041095219553"}},"0.3.1":{"name":"stream-source","version":"0.3.1","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"e5983c1c475ef9ec0f142b9cf8e3f8f5a6ff856d","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.1","_shasum":"711940f3c265e7a3587e3d22a63d41f090275633","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"711940f3c265e7a3587e3d22a63d41f090275633","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.1.tgz","integrity":"sha512-P/ZEzSCnB/c6qseMhagAOhjodKDztPJG1G+o3ZQ6MooXbkIenfpnDcG1VduCfjAmfxB90zW8/zepoI7Mis3BvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsVFgCNMbsgWNHTJ7m5REUtJEigOXqx9pwjGKWYr28HAiEAiLc0QbExJGPNZu2yvsb5lZcXcTTlUzPW3ShdKnF3t64="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.3.1.tgz_1473267602200_0.7022623792290688"}},"0.3.2":{"name":"stream-source","version":"0.3.2","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"index.node.js","module":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"postpublish":"git push && git push --tags"},"gitHead":"dd35348ebb3ed4918f03a31e73c0a96ba5a1b639","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.2","_shasum":"020211509303f63c98db0d2e9b264103a41410cf","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"020211509303f63c98db0d2e9b264103a41410cf","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.2.tgz","integrity":"sha512-kVis2X2goVS6M25tQExPzxTIW5aOl7ki8uWvREZjfoumpn3VfGbr2+lFc0UrlxE034pQQtYzBNNClWl9cR3snw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBN66Y22BLTDhR02LEIFGIeQ/iJ1NILBeZf4mX1ptfgpAiBFLmvKFCyqlOB7IG6sL9hFUnHgnSRzHnS8wecJ+D8LJA=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.3.2.tgz_1473288256756_0.4965637014247477"}},"0.3.3":{"name":"stream-source","version":"0.3.3","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"browser":"dist/stream-source.js","main":"index.node.js","module":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"prepublish":"rm -rf dist && mkdir dist && rollup --banner \"$(preamble)\" -f umd -n sources.stream -o dist/stream-source.js -- index.js && uglifyjs --preamble \"$(preamble)\" -o dist/stream-source.min.js -cm -- dist/stream-source.js","postpublish":"git push && git push --tags"},"devDependencies":{"package-preamble":"0.0","rollup":"0.34","uglify-js":"2"},"gitHead":"808ce9ec6b399e6ca4e7617ba263b91a98cbb264","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.3","_shasum":"f2ca1f9253a27e3ab3aa4e7bc62e3fa48993413a","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"f2ca1f9253a27e3ab3aa4e7bc62e3fa48993413a","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.3.tgz","integrity":"sha512-lxyeVUQ/XFz7pWCc69/waUBh4Y1aGYKWUmJQNwNPtCkGiaBc4gWIOdmWUevhHD10frz8n1Mz7Gywpcw1OYT+KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEL88pvNbmkw2tM+yOasetS5kgMdKAKcjpmAlEFcClxWAiAbG0MKFE/YkiWVgaojXsiMkza+CXwcuVIsuXemOfDDcw=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.3.3.tgz_1473288431455_0.4805036673787981"}},"0.3.4":{"name":"stream-source","version":"0.3.4","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"browser":"dist/stream-source.js","main":"index.node.js","module":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"prepublish":"rm -rf dist && mkdir dist && rollup --banner \"$(preamble)\" -f umd -n sources.stream -o dist/stream-source.js -- index.js && uglifyjs --preamble \"$(preamble)\" -o dist/stream-source.min.js -cm -- dist/stream-source.js","postpublish":"git push && git push --tags"},"devDependencies":{"package-preamble":"0.0","rollup":"0.34","uglify-js":"2"},"gitHead":"881ca97c0d9898c3b703249bbca96e2a4521821e","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.4","_shasum":"0427c1fb128b0bd2d884d868dcc894208f9bda3b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"mbostock","email":"mbostock@gmail.com"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"dist":{"shasum":"0427c1fb128b0bd2d884d868dcc894208f9bda3b","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.4.tgz","integrity":"sha512-PSSZakk9Cpbh6DoeAVeiOooyXyz4SRo7Su3iW0UUy/G2WrLVDxm6MNY3q16V4fJw8/eoCHRujdtEyf5ZDZa6XQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1kmhMiaex2AEFMwgXQItp7z36viL6/DV0Jz77bOI4PAiEA0WSSCqJfuUvX2kdyXji+gBIU+uFNC1QRvAfSx1eoKUo="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/stream-source-0.3.4.tgz_1473394612833_0.6691070878878236"}},"0.3.5":{"name":"stream-source","version":"0.3.5","description":"Read binary streams in chunks, on demand, with promises.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/stream-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"unpkg":"dist/stream-source.js","jsdelivr":"dist/stream-source.js","main":"index.node.js","module":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"scripts":{"prepublishOnly":"rm -rf dist && mkdir dist && rollup -c --banner \"$(preamble)\" && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" -o dist/stream-source.min.js -c -m -- dist/stream-source.js","postpublish":"git push && git push --tags"},"devDependencies":{"package-preamble":"0.1","rollup":"0.49","uglify-js":"3"},"gitHead":"6370854836b8f9bd5644c5fe8bd9638cb9edcfd5","bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"_id":"stream-source@0.3.5","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"integrity":"sha512-ZuEDP9sgjiAwUVoDModftG0JtYiLUV8K4ljYD1VyUMRWtbVf92474o4kuuul43iZ8t/hRuiDAx1dIJSvirrK/g==","shasum":"b97f52d0f8ea566db071db679b985403a31e0340","tarball":"https://registry.npmjs.org/stream-source/-/stream-source-0.3.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiOGezLmw5nHN72xt6ss5L64jVb2r+9YvIOdzX+nxihwIgMIg9bHe1DJP1C/oOZMX0cTMBwiTao2ACv7rILjJXWbY="}]},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-source-0.3.5.tgz_1504389734836_0.12413435312919319"}}},"readme":"# stream-source\n\nA [readable stream reader](https://streams.spec.whatwg.org/#readable-stream-reader) implementation on top of a Node [readable stream](https://nodejs.org/api/stream.html#stream_class_stream_readable). This library allows you to write code that takes a *source* as input, and can work with either native readable streams or Node streams. For example:\n\n```js\nvar stream = require(\"stream-source\");\n\nfunction read(source) {\n  return source.slice(40).then(value => {\n    if (value == null) return;\n    process.stdout.write(value);\n    return read(source);\n  });\n}\n\nread(stream(process.stdin))\n  .catch(error => console.error(error.stack));\n```\n\n## API Reference\n\n<a name=\"stream\" href=\"#stream\">#</a> <b>stream</b>(<i>stream</i>) [<>](https://github.com/mbostock/stream-source/blob/master/index.js#L1 \"Source\")\n<br><a href=\"#stream\">#</a> <b>stream</b>(<i>reader</i>)\n\nIn Node, returns a [sliceable](https://github.com/mbostock/slice-source) *source* for the specified Node [readable *stream*](https://nodejs.org/api/stream.html#stream_class_stream_readable). In a browser, if the specified *reader* exposes a *reader*.read method, it is assumed to be a [readable stream *reader*](https://streams.spec.whatwg.org/#readable-stream-reader), and the specified *reader* is returned as-is. Otherwise, the specified *reader* is assumed to be a [readable *stream*](https://streams.spec.whatwg.org/#rs), and the reader returned by *stream*.getReader is returned.\n\n<a name=\"source_slice\" href=\"#source_slice\">#</a> <i>source</i>.<b>slice</b>(<i>length</i>) [<>](https://github.com/mbostock/stream-source/blob/master/slice.js \"Source\")\n\nReturns a Promise for the next chunk of data from the underlying stream, yielding a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) (a [Buffer](https://nodejs.org/api/buffer.html)) of *length* bytes, or the remaining bytes of the underlying stream if the underlying stream has more than zero but fewer than *length* bytes remaining, or null when no bytes remain in the stream.\n\n<a name=\"source_read\" href=\"#source_read\">#</a> <i>source</i>.<b>read</b>() [<>](https://github.com/mbostock/stream-source/blob/master/read.js \"Source\")\n\nReturns a Promise for the next chunk of data from the underlying stream. The yielded result is an object with the following properties:\n\n* `value` - a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) (a [Buffer](https://nodejs.org/api/buffer.html)), or undefined if the stream ended\n* `done` - a boolean which is true if the stream ended\n\n<a name=\"source_cancel\" href=\"#source_cancel\">#</a> <i>source</i>.<b>cancel</b>() [<>](https://github.com/mbostock/slice-source/blob/master/cancel.js \"Source\")\n\nReturns a Promise which is resolved when the underlying stream has been destroyed.\n","maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"time":{"modified":"2022-06-27T00:49:46.968Z","created":"2016-09-02T23:06:30.324Z","0.0.1":"2016-09-02T23:06:30.324Z","0.0.2":"2016-09-05T00:59:32.642Z","0.1.0":"2016-09-05T20:11:54.976Z","0.2.0":"2016-09-06T18:12:33.530Z","0.2.1":"2016-09-07T00:18:41.789Z","0.2.2":"2016-09-07T00:31:44.343Z","0.3.0":"2016-09-07T16:55:13.584Z","0.3.1":"2016-09-07T17:00:04.396Z","0.3.2":"2016-09-07T22:44:19.142Z","0.3.3":"2016-09-07T22:47:13.756Z","0.3.4":"2016-09-09T04:16:55.109Z","0.3.5":"2017-09-02T22:02:14.935Z"},"homepage":"https://github.com/mbostock/stream-source","keywords":["binary","stream","reader"],"repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/stream-source.git"},"author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"bugs":{"url":"https://github.com/mbostock/stream-source/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}