New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-firestore

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-firestore

Using Firestore made easier!

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-77.78%
Maintainers
1
Weekly downloads
 
Created
Source

Node Firestore

Using Firestore made easier!

Install

npm install node-firestore
# OR
yarn add node-firestore
# OR
pnpm add node-firestore

Docs

Checkout the API docs @ mdxwarriorxop.github.io/node-firestore

Usage

const { DB } = require("node-firestore");
const { join } = require("path");

//OR

import { DB } from "node-firestore";
import { join } from "node:path";

const db = new DB(join(__dirname, "./my-firebase-key.json"));

// add data to the DB.
const success = db.addData("foo", "bar", {
  hello: "world",
});

// if not successful
if (!success) {
  console.error("There was an error adding data!");
}

// read data from the DB.
const data = db.getData("foo", "bar");

if (!data) {
  console.error("Error retrieving data!");
} else {
  console.log(data); //=> { hello: "world" }
}

// delete data on the DB.
const success = db.deleteDocument("foo", "bar");

if (!success) {
  console.error("Error deleting document!");
}

// delete collection on the DB
const success = firestore.deleteCollection("foo", 5);

if (!success) {
  console.error("Error deleting collection!");
}

Keywords

FAQs

Package last updated on 03 May 2023

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