Skip to content

senecajs-labs/seneca-entity-save-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seneca

A Seneca.js plugin

seneca-entity-save-stream

Gitter

Stream down and build seneca entities!

  • Version: 0.0.4
  • Tested on: Seneca 0.7.1
  • Node: 0.10, 0.11, 0.12, 4

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.

Install

To install, simply use npm. Remember you will need to install Seneca.js if you haven't already.

npm install seneca-entity-save-stream

Test

To run tests, simply use npm:

npm run test

Example

'use strict'

var seneca = require('seneca')()
var entSaveStream = require('..')
var pear = seneca.make('pear')
var 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) {
    if (!err) console.log(res)
  })
})

Contributing

The Senecajs org encourages open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

Acknowledgements

This project was kindly sponsored by nearForm.

License

Copyright Matteo Collina and other contributors 2014 - 2016, Licensed under MIT.

About

Stream down your seneca entities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published