1.2.3 • Published 7 years ago

stream-each v1.2.3

Weekly downloads
10,931,953
License
MIT
Repository
github
Last release
7 years ago

stream-each

Iterate all the data in a stream

npm install stream-each

build status

Usage

var each = require('stream-each')

each(stream, function (data, next) {
  console.log('data from stream', data)
  // when ready to consume next chunk
  next()
}, function (err) {
  console.log('no more data')
})

API

each(stream, iterator, cb)

Iterate the data in the stream by calling the iterator function with (data, next) where data is a data chunk and next is a callback. Call next when you are ready to consume the next chunk. Optionally you can call next with an error to destroy the stream

When the stream ends/errors the callback is called if provided

License

MIT

Related

stream-each is part of the mississippi stream utility collection which includes more useful stream modules similar to this one.

mississippivuedragdropuploadimageskilli8n-react-native-fast-image@cashremit/cr-streamline-iconsbb-chat@frxf/frxf@fundefund/funde_ckgql_din_mod@l1nyanm1ng/react-picture-viewerjs4cytoscape@infinitebrahmanuniverse/nolb-stream-@saaspe/components@everything-registry/sub-chunk-2834test-carosello-campusweb-to-datvue-button-test1webchesupercluster-googlemaps-adapter-clonestestapasuperlevelsvelte-component-libtextfield-samplevue-compmentvue-dev-clone@blkmarketco/components-library@beldore/react-otp-input@percent/percent-api-hooks@rbc-public/react-selectable-fastjesusdemojamuskalimimport-npm-to-mongodbhypercore-indexhypercore-reduceimshyperdrive-count-importhyperdrive-swarmhubot-budahot-zone-vuehlsrecordgrid-component-react-ex-1guruwayguruway.jshelp-widgetiocanelitepie-datepicker-gabelevel-tail-streamm2m-chartjs-plugin-crosshairl2forlernakrown_login_library@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@udooku/react-image-comparison-slider@tonysusi/vapid@thedoctor0/vuex-shared-mutations@vitali_shcherbina/styled-lib@zh0st/evm-chains@zebracompany/f_editora_react_reflux_demob2x-utilsarifbudixzap-vue-captchaappcharge-checkout@simstudio/htmldiffdfeuk-frontenddfeuk-frontend-manualstnenopmoc-iustock-ticker-react-widgettingzi-vuepresstinymce-plugin-toyu-library@carhoo/widget-dealersyolowatchvue-v3-yandex-metrikaverify-img-codevformlmq@kristoffertonning/vue-laravel-errors@krwhitley/neataptic@lego-js/tests@kirrosh/pts@react-18-pdf/root@pqmcgill/dat-node@safely-project/safely-ts@sackmanson/quill-image-uploader@poondestroyer/sig@podlubnaja/ui-kit@seculum/vue-dev-clone@stansaal/ckeditor5-custom-buildmississippi2miracle-webpack-tree-shakingmiguelcostero-ng2-toastymyui5librarymobomyreuselibrarymyui5librarychenopen-source-stats-streamparvan_componentsparvan_reactjs_componentssam-carousels3-storagereact-misc-toolboxsamc2samc3
1.2.3

7 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

9 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago