UNPKG

explicaboamet

Version:

A Modular, Extensible and Flexible web3 wallet framework for building dApps.

13 lines (10 loc) 267 B
import type { Route } from '@site/types/Route'; export const getRouteBySlug = ( slug: string[], routes: Route[], ): Route | undefined => { for (const route of routes) { if (slug.join('/') === route.slug.join('/')) return route; } return undefined; };