UNPKG

@esmx/core

Version:

A high-performance microfrontend framework supporting Vue, React, Preact, Solid, and Svelte with SSR and Module Federation capabilities.

11 lines (10 loc) 286 B
export function pathWithoutIndex(i: Record<string, string>) { const s = '/index'; Object.entries(i).forEach(([k, v]) => { if (k.endsWith(s)) { k = k.substring(0, k.length - s.length); if (k in i) return; i[k] = v; } }); }