Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

firebase-stats

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-stats

Retrieve Firebase network stats from a Firebase ref

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

firebase-stats

Build Status

The Firebase client hides bytes sent and received stats behind minified properties that change with every release. You can call Firebase.INTERNAL.stats(ref), which has a stable name, but simply spits out the stats to the console -- largely useless if you want those values programmatically.

This module searches a Firebase ref for the stats object and returns it to you. It does this by looking for an object with a property called bytes_sent. This should continue to work across releases, but we're obviously well in to undocumented internal territory, so this comes with absolutely no warranty; use at your own risk. This module will throw if it can't find the stats object.

The search is only performed the first time you use this module; it caches the path to the stats object so that future calls will be very quick.

Example

var firebaseStats = require('firebase-stats'),
    Firebase = require('firebase'),
    ref = new Firebase('https://docs-examples.firebaseio.com');

firebaseStats(ref); // -> { bytes_received: 287, bytes_sent: 58 }

FAQs

Package last updated on 09 Feb 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc