@vercel/edge-config
Globally distributed key-value store optimized for edge reads, with typed get, getAll, and has operations.
Official Documentation ↗v1.2. Check the official docs for the latest API surface.Installation
npm install @vercel/edge-configMethods
No methods match this filter.
@vercel/edge-config is globally distributed key-value store optimized for edge reads, with typed get, getall, and has operations. This page documents the core methods, installation, and common usage patterns for the current stable release.
Installation
Install @vercel/edge-config with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.
Core methods
The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v1.2 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.
Frequently asked questions
The faq section in the frontmatter answers the most common questions about @vercel/edge-config, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.
Security
Official security statements captured from the package documentation:
- 官方声明 SDK 为只读,写入需走 Edge Config 更新 API — “If you need to programmatically write to an Edge Config, check out the Update your Edge Config items section.” (source: https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts, fetched 2026-11-08T20:25:00+08:00)
- consistentRead 会绕过全部缓存直连源站,官方不建议默认启用 — “Enabling
consistentReadwill bypass all caches and hit the origin * directly. This will make sure to fetch the most recent version of * an Edge Config with the downside of an increased latency. * * We do not recommend enabling this option, unless you are reading * Edge Config specifically for “ (source: https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts, fetched 2026-11-08T20:25:00+08:00)
API reference evidence
Fetched from official sources on 2026-11-08T20:25:00+08:00 via WebFetch https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts(npm 发布包内的官方 .d.ts 类型声明文件).
get→ signature from https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts; official text: “/** * Read a single value. * * @param key - the key to read * @returns the value stored under the given key, or undefined */ get: <T = EdgeConfigValue>(key: string, options?: EdgeConfigFunctionsOptions) => Promise<T | un”getAll→ signature from https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts; official text: “/** * Reads multiple or all values. * * Allows you to read all or only selected keys of an Edge Config at once. * * @param keys - the keys to read * @returns Returns all entries when called with no arguments or only entr”has→ signature from https://unpkg.com/@vercel/edge-config@latest/dist/index.d.ts; official text: “/** * Check if a given key exists in the Edge Config. * * @param key - the key to check * @returns true if the given key exists in the Edge Config. */ has: (key: string, options?: EdgeConfigFunctionsOptions) => Promise<b”
FAQ
- How fast are reads?
- Edge Config is replicated to every region; reads are typically under 5 ms from the edge.
- Can I update from code?
- Use the REST API or Vercel dashboard; the SDK is read-only for safety in edge functions.
- Is it a database?
- No. It is a read-optimized KV store for flags, redirects, and small config; use Postgres for relational data.
Report a problem with this API docOpens a pre-filled issue on GitHub.