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

@inpassor/firebase-config

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inpassor/firebase-config

Firebase Remote Config library

  • 1.0.1
  • Source
  • npm
  • Socket score

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

Firebase Remote Config library

https://firebase.google.com/products/remote-config/

This library used for interaction with Firebase Remote Config REST API to set or get Remote Config values in Node.js environment.

For storing ETag value the library uses node-cache npm package.

To authorize Remote Config API requests the library have three options on your choice:

  • Provide a private key file for your service account.
  • Provide a key and keyId of your Firebase project.
  • Use none of above in case of usage of the library in the Firebase environment.

Example

import * as path from 'path';
import {
    FirebaseConfig,
    DataObject,
} from '@inpassor/firebase-config';

/**
 * Instantiate FirebaseConfig
 */
const firebaseConfig = new FirebaseConfig({
    projectId: 'my-awesome-project-id',
    keyFileName: path.resolve('path-to', 'my-awesome-project-service-key.json'),
    // key: 'my-project-key',
    // keyId: 'my-project-key-id',
    // cacheOptions: {
    //     stdTTL?: number;
    //     checkperiod?: number;
    //     errorOnMissing?: boolean;
    //     useClones?: boolean;
    //     deleteOnExpire?: boolean;
    // },
    // delimiter: '---',
});

/**
 * Set Remote Config 
 */
firebaseConfig.set({
    // [key: string]: any
}).then(() => {
    console.log('published');
}, (error: any) => {
    console.error(error);
});

/**
 * Get Remote Config 
 */
firebaseConfig.get().then((parameters: DataObject) => {
    console.log(parameters);
}, (error: any) => {
    console.error(error);
});

Keywords

FAQs

Package last updated on 01 Feb 2019

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