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

@vercel/edge-config

Package Overview
Dependencies
Maintainers
9
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/edge-config

Ultra-low latency data at the edge

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
85K
decreased by-59.92%
Maintainers
9
Weekly downloads
 
Created

What is @vercel/edge-config?

@vercel/edge-config is a package designed to manage configuration at the edge, allowing developers to dynamically control and update configuration settings for their applications without redeploying. This is particularly useful for feature flags, A/B testing, and other runtime configuration needs.

What are @vercel/edge-config's main functionalities?

Fetching Configuration

This feature allows you to fetch the current configuration settings from the edge. The `getConfig` function retrieves the configuration, which can then be used within your application.

const { getConfig } = require('@vercel/edge-config');

async function fetchConfig() {
  const config = await getConfig();
  console.log(config);
}

fetchConfig();

Setting Configuration

This feature allows you to update the configuration settings at the edge. The `setConfig` function takes a new configuration object and updates the settings accordingly.

const { setConfig } = require('@vercel/edge-config');

async function updateConfig(newConfig) {
  await setConfig(newConfig);
  console.log('Configuration updated');
}

updateConfig({ featureFlag: true });

Listening for Configuration Changes

This feature allows you to listen for changes in the configuration settings. The `onConfigChange` function takes a callback that is executed whenever the configuration is updated.

const { onConfigChange } = require('@vercel/edge-config');

onConfigChange((newConfig) => {
  console.log('Configuration changed:', newConfig);
});

Other packages similar to @vercel/edge-config

FAQs

Package last updated on 16 Sep 2024

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