1.2.3 • Published 6 years ago

stream-each v1.2.3

Weekly downloads
10,931,953
License
MIT
Repository
github
Last release
6 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-2834l2forlernalevel-tail-streamlitepie-datepicker-gabehelp-widgethlsrecordhot-zone-vuehubot-budahypercore-indexhypercore-reducehyperdrive-count-importhyperdrive-swarmimport-npm-to-mongodbimsiocanejamuskalimjesusdemomyui5librarychenmyui5librarymobong-search-dropdown@jimpick/hyperdrive-hyperdb-backendmississippi2miracle-webpack-tree-shakingmyreuselibrarym2m-chartjs-plugin-crosshairmiguelcostero-ng2-toastynois-react-toastnoise-protocol-stream@simstudio/htmldiffeditorjs-alerticonsdwebs-coreeasyplayer-mygrid-component-react-ex-1guruwayguruway.jsfirst-app-lyfucifastlion-picture-viewerflexelflowable-bpmn-modelerfrdrk-js-semaphorefork-react-ffmpegfn-lib-exampleforminput-ui-libqa_hddprova-2-caroselloprova-cmpprova-cpm-2prova-cpm-3prova-cpm-4qyx-hmtldiffreact-form-component-libraryreact-misc-toolboxopen-source-stats-streamparvan_componentsparvan_reactjs_componentsreact-redux-demo1react-picky-with-clearreact-otp-input-uptdsequelcomponentselective-archive@ericmcornelius/ease@elsouza1985/react-org-chart@hproinformatica/functions@farvater/open-pedigree@ikon-x/ckeditor5-custom-build-for-irrosoft@jarrydark/editorsimplejs@hyperdivision/heimdall@jimpick/hyperdrive-legacy@jimpick/hyperdrive-next@jimpick/dat-node@jimpick/hyperdrive@icetee/react-recaptcha-v3vformlmqverify-img-codevue-compmentvue-dev-clonetinymce-plugin-toytextfield-sampletestapavue-button-test1u-libraryvue-v3-yandex-metrika@inti-ar/evm-chains@meysam213/react-leaflet@kirrosh/pts@krwhitley/neataptic@kristoffertonning/vue-laravel-errors@innodata/vue-v3-ya-metrika
1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago