0.1.12 • Published 9 years ago

firestream v0.1.12

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

firestream

var stream = firestream.create(url, { page: 10 });

stream
  .map(function(ref) {
    // optional mapping function
    // return mapped value or a Promise with the mapped value
    // @see https://github.com/jogabo/firenext
    return db
      .child('my-objects')
      .child(ref.key())
      .exec();
  })
  .on('value', function(arr) {
    // array of all the values colleced so far
  })
  .on('readable', function() {
    // time to read more data
  })
  .on('end', function() {
    // reached the end
  })

// read next 10 children
stream.read();

// when new data is added at the top, stream will fire a value event
firebase.child('0').set('zero');

// when data is updated, stream will fire a value event
firebase.child('1').set('one..');

// when data is moved, stream will fire a value event
firebase.child('1').setPriority(2);

// when data is removed, stream will fire a value event
firebase.child('1').remove();


stream
0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago