Wondering what’s next for npm?Check out our public roadmap! »

seneca-entity-save-stream

0.0.4 • Public • Published

seneca-entity-save-stream

Stream down and build seneca entities!

var seneca        = require('seneca')()
  , entSaveStream = require('seneca-entity-save-stream')
  , pear          = seneca.make('pear')
  , pearImporter  = entSaveStream(seneca, { name$: 'pear' })
 
pearImporter.on('one', function() {
  console.log('element saved')
})
 
pearImporter.end({
  name: 'my pear',
  price: 200
}, function() {
  pear.list$({}, function(err, res) {
    console.log(res)
  })
})

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Keywords

none

Install

npm i seneca-entity-save-stream

DownloadsWeekly Downloads

71

Version

0.0.4

License

MIT

Last publish

Collaborators

  • avatar
  • avatar