MCPcopy Create free account
hub / github.com/api-platform/website / getVersionAndSlugFromSlugs

Function getVersionAndSlugFromSlugs

pwa/utils/index.tsx:54–62  ·  view source on GitHub ↗
(allSlugs: string[])

Source from the content-addressed store, hash-verified

52 dayjs(time, "HH:mm").format("HH:mm");
53
54export const getVersionAndSlugFromSlugs = (allSlugs: string[]) => {
55 const version = versions.includes(allSlugs[0].substring(1))
56 ? allSlugs[0].substring(1)
57 : current;
58 const slugs = versions.includes(allSlugs[0].substring(1))
59 ? allSlugs.slice(1, allSlugs.length)
60 : allSlugs;
61 return { version, slugs: slugs.length ? slugs : ["distribution"] };
62};
63
64export const getRootUrl = () => {
65 return "https://api-platform.com";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected