0.1.12 • Published 10 years ago

firestream v0.1.12

Weekly downloads
5
License
ISC
Repository
github
Last release
10 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

10 years ago

0.1.11

10 years ago

0.1.10

11 years ago

0.1.9

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago