UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

9 lines (8 loc) 288 B
export { findPageConfig }; import { assert } from '../../utils/assert.js'; function findPageConfig(pageConfigs, pageId) { const result = pageConfigs.filter((p) => p.pageId === pageId); assert(result.length <= 1); const pageConfig = result[0] ?? null; return pageConfig; }