Generation

generate functionSat, 12 Nov 2022

split routes vuex and shopware

function splitRoutes(routes: RouteConfig[], splitAt: string): RouteConfig[] { const index = routes.findIndex(route => route.name === splitAt) // console.log(routes[index]) const vuexRoutes: RouteConfig[] = routes.slice(0, index) const shopwareRoutes: RouteConfig[] = routes.slice(index) return [vuexRoutes, shopwareRoutes] }

TypeScript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code