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.3.0
  • latest
  • Source
  • npm
  • Socket score

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

Firebase Remote Config library

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

Dependencies

google-auth-library

The library uses google-auth-library npm package and provides a variety of ways to authenticate Remote Config API requests:

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

Read about Google Cloud API authentication at Getting Started with Authentication

node-cache

The library uses node-cache npm package for storing ETag value.

See cacheOptions config option.

flat

The library uses flat npm package for flatten and unflatten Remote Config parameters.

See delimiter config option.

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: {
    //     forceString?: boolean;
    //     objectValueSize?: number;
    //     arrayValueSize?: number;
    //     stdTTL?: number;
    //     checkperiod?: number;
    //     useClones?: boolean;
    //     errorOnMissing?: boolean;
    //     deleteOnExpire?: boolean;
    // },
    // delimiter: '___',
    // defaultErrorMessage: 'Invalid response from the Firebase Remote Config service',
});

/**
 * 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 14 Jan 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