New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

firebase-counter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-counter

Counter with firebase backend

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status js-standard-style

firebase-counter

Counter with firebase backend

Installation

$ npm i firebase-counter

Usage

Add, subtract og lookup values for a specific key in firebase.

  • Uses value as key if no key supplied.
  • Defaults to 1 if no value is presented.
  • Supports promises and callbacks
const fbc = require('firebase-counter')
const counterOptions = {
  apiKey: '<your-api-key>',
  authDomain: '<your-auth-domain>',
  databaseURL: '<your-database-url>',
  appName: '<your-app-name>',
  authEmail: '<your-auth-email>',
  authPassword: '<your-auth-password>'
}

const counter = fbc(counterOptions)

counter.add({'key': 'fishy', value: 10}).then(data => console.log(data))

counter.subtract({'key': 'fishy', value: 5}).then(data => console.log(data))

counter.lookup({'key': 'fishy'}).then(data => console.log(data))

License

MIT

Keywords

counter

FAQs

Package last updated on 01 Dec 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