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

firejson

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firejson

A simple json database with a similar syntax of the firestore database.

  • 1.0.0
  • Source
  • npm
  • Socket score

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

FIREJSON

Firejson is a simple json store lib with a similar syntax of the google firestore database lib, maded with TypeScript

Installing

npm i --save firejson

Setting data

To set data make like this:

import firejson from 'firejson';

// setting up the database
const db = firejson('myDb');

// setting data
db.collection('myCollection').doc('myDoc').set({ foo: 'bar' });
// returns a boolean

Getting a doc data

To get data make like this:

import firejson from 'firejson';

// setting up the database
const db = firejson('myDb');

// getting data
const myData: any | boolean = db.collection('myCollection').doc('myDoc').get();
// returns a any object or a boolean

if its gonna throw an error returns false.

Updating a doc data

To update data make like this:

import firejson from 'firejson';

// setting up the database
const db = firejson('myDb');

// updating data
db.collection('myCollection').doc('myDoc').update({ todo: ['myTodoList'] });
// returns a boolean

Deleting a doc

To delete a doc make like this:

import firejson from 'firejson';

// setting up the database
const db = firejson('myDb');

// deleting data
db.collection('myCollection').doc('myDoc').delete();
// returns a boolean

Keywords

FAQs

Package last updated on 15 Jul 2020

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