Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

firestream

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firestream

firestream ==========

latest
npmnpm
Version
0.1.12
Version published
Maintainers
1
Created
Source

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

Keywords

firebase

FAQs

Package last updated on 04 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts