{"_id":"array-source","_rev":"3001250","name":"array-source","description":"Read arrays as standard WhatWG streams.","dist-tags":{"latest":"0.0.4"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"time":{"modified":"2023-08-29T08:56:48.000Z","created":"2016-09-06T20:48:22.020Z","0.0.4":"2017-09-02T22:09:20.626Z","0.0.3":"2016-09-06T22:50:26.444Z","0.0.2":"2016-09-06T21:23:51.488Z","0.0.1":"2016-09-06T20:48:22.020Z"},"users":{},"author":{"name":"Mike Bostock","url":"https://bost.ocks.org/mike"},"repository":{"type":"git","url":"git+ssh://git@github.com/mbostock/array-source.git"},"versions":{"0.0.4":{"name":"array-source","version":"0.0.4","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":{"prepublishOnly":"rm -rf dist && mkdir dist && rollup -c --banner \"$(preamble)\" && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" -o dist/array-source.min.js -c -m -- dist/array-source.js","postpublish":"git push && git push --tags"},"devDependencies":{"package-preamble":"0.1","rollup":"0.49","uglify-js":"3"},"gitHead":"754494973a1dd0ed23da37c437f53972e37fb953","bugs":{"url":"https://github.com/mbostock/array-source/issues"},"_id":"array-source@0.0.4","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"mbostock","email":"mike@ocks.org"},"dist":{"shasum":"a525df4a84b1376d27c677cd426a97c3882f8aca","size":2832,"noattachment":false,"key":"/array-source/-/array-source-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-source/download/array-source-0.0.4.tgz"},"maintainers":[{"name":"mbostock","email":"mike@ocks.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-source-0.0.4.tgz_1504390160526_0.6673485927749425"},"directories":{},"publish_time":1504390160626,"_hasShrinkwrap":false,"_cnpm_publish_time":1504390160626,"_cnpmcore_publish_time":"2021-12-16T19:31:54.996Z"},"0.0.3":{"name":"array-source","version":"0.0.3","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":"510cf96de1b3ddca9d82d84db1b1a0cc395838b0","bugs":{"url":"https://github.com/mbostock/array-source/issues"},"_id":"array-source@0.0.3","_shasum":"6ee635763c4fb4cd9990f876321cb29e6d7dded1","_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":"6ee635763c4fb4cd9990f876321cb29e6d7dded1","size":2736,"noattachment":false,"key":"/array-source/-/array-source-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-source/download/array-source-0.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/array-source-0.0.3.tgz_1473202224589_0.07595273363403976"},"directories":{},"publish_time":1473202226444,"_hasShrinkwrap":false,"_cnpm_publish_time":1473202226444,"_cnpmcore_publish_time":"2021-12-16T19:31:55.196Z"},"0.0.2":{"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","size":2660,"noattachment":false,"key":"/array-source/-/array-source-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-source/download/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":{},"publish_time":1473197031488,"_hasShrinkwrap":false,"_cnpm_publish_time":1473197031488,"_cnpmcore_publish_time":"2021-12-16T19:31:55.489Z"},"0.0.1":{"name":"array-source","version":"0.0.1","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":"bf81f34bd1d1f8dfd950b19bd3470f5b6f233ab8","bugs":{"url":"https://github.com/mbostock/array-source/issues"},"_id":"array-source@0.0.1","_shasum":"9eb760920cb20afc51d99eb7868d62c547805e53","_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":"9eb760920cb20afc51d99eb7868d62c547805e53","size":3118,"noattachment":false,"key":"/array-source/-/array-source-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-source/download/array-source-0.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/array-source-0.0.1.tgz_1473194901794_0.41055201063863933"},"directories":{},"publish_time":1473194902020,"_hasShrinkwrap":false,"_cnpm_publish_time":1473194902020,"_cnpmcore_publish_time":"2021-12-16T19:31:55.692Z"}},"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","_attachments":{},"homepage":"https://github.com/mbostock/array-source","bugs":{"url":"https://github.com/mbostock/array-source/issues"},"license":"BSD-3-Clause"}