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

@firebase/database

Package Overview
Dependencies
Maintainers
3
Versions
3357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/database

This is the realtime database component for the Firebase JS SDK. It has a peer dependency on the [`@firebase/app`](https://npm.im/@firebase/app) package on NPM. This package is included by default in the [`firebase`](https://npm.im/firebase) wrapper packa

  • 0.1.11-canary.9cda9c9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8M
decreased by-21.87%
Maintainers
3
Weekly downloads
 
Created

What is @firebase/database?

The @firebase/database package is a client library for Firebase Realtime Database, a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. It offers APIs that allow developers to easily store and sync data across multiple clients and platforms.

What are @firebase/database's main functionalities?

Realtime Data Syncing

This feature allows you to listen for and receive data in realtime from the Firebase database. Whenever data changes, the event is triggered and the callback function is executed with the updated data.

firebase.database().ref('/path/to/data').on('value', (snapshot) => {
  const data = snapshot.val();
  console.log(data);
});

Data Writing

Enables you to write data to a specified path in your Firebase database. This can be used to add new data or overwrite existing data at the path.

firebase.database().ref('/path/to/data').set({
  username: 'name',
  email: 'email@example.com',
  profile_picture : 'imageUrl'
});

Data Reading

Allows you to read data from your Firebase database. This method fetches data once without listening for changes.

firebase.database().ref('/path/to/data').once('value').then((snapshot) => {
  const data = snapshot.val();
  console.log(data);
});

Data Deleting

This feature enables you to delete data from your Firebase database at a specified path.

firebase.database().ref('/path/to/data').remove();

Other packages similar to @firebase/database

FAQs

Package last updated on 27 Feb 2018

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