{"name":"array-source","version":"0.0.2","description":"Read arrays as standard WhatWG streams.","keywords":["binary","stream","reader"],"homepage":"https://github.com/mbostock/array-source","license":"BSD-3-Clause","author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"main":"dist/array-source.js","module":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/array-source.git"},"scripts":{"prepublish":"rm -rf dist && mkdir dist && rollup --banner \"$(preamble)\" -f umd -n sources.array -o dist/array-source.js -- index.js && uglifyjs --preamble \"$(preamble)\" -o dist/array-source.min.js -cm -- dist/array-source.js","postpublish":"git push && git push --tags"},"devDependencies":{"package-preamble":"0.0","rollup":"0.34","uglify-js":"2"},"gitHead":"201c8c631f3da9c26710fc0026de8eecaf8a35ff","bugs":{"url":"https://github.com/mbostock/array-source/issues"},"_id":"array-source@0.0.2","_shasum":"6b14ea6bb413f76b27ae0755c14c91aae1ee7ff2","_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":"6b14ea6bb413f76b27ae0755c14c91aae1ee7ff2","tarball":"http://registry-npm.ywwl.com/array-source/download/array-source-0.0.2.tgz","integrity":"sha512-v8bzoQUAWhno+n7lzYnpq1AKGvzBUI1m/B+/9sZhFdQ41KkeUCuZvN3oQOWRabTQCu9GSCqjqZj4xgLU3rmAKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEHsBmFQ5UMVAaYaExyWICk1MF0emkXeExym0E9v1pAAiApNYnoCabOfHuxP+AJtn9BN/mlndgOtfEcsmjRpoOwyA=="}],"size":2660,"noattachment":false,"key":"/array-source/-/array-source-0.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/array-source-0.0.2.tgz_1473197029627_0.6512419658247381"},"directories":{},"readme":"# array-source\n\nA [readable stream reader](https://streams.spec.whatwg.org/#readable-stream-reader) for reading from an in-memory array.\n\n## API Reference\n\n<a name=\"array\" href=\"#array\">#</a> <b>array</b>(<i>array</i>) [<>](https://github.com/mbostock/array-source/blob/master/index.js#L4 \"Source\")\n<br><a href=\"#array\">#</a> <b>array</b>(<i>length</i>)\n<br><a href=\"#array\">#</a> <b>array</b>(<i>object</i>)\n<br><a href=\"#array\">#</a> <b>array</b>(<i>buffer</i>)\n\nReturns a sliceable *source* for the specified [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). If the specified *array* is not a Uint8Array, it is passed to the Uint8Array constructor to create a new array; see the [TypedArray constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Syntax) for details.\n\n<a name=\"source_read\" href=\"#source_read\">#</a> <i>source</i>.<b>read</b>() [<>](https://github.com/mbostock/array-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), 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/array-source/blob/master/cancel.js \"Source\")\n\nReturns a Promise which is resolved when the underlying stream has been destroyed.\n","publish_time":1473197031488,"_cnpm_publish_time":1473197031488,"dist-tags":{"latest":"0.0.4"}}