openpanel/cypress/utils/getIdFromURL/index.ts
2024-02-05 10:23:04 +01:00

5 lines
128 B
TypeScript

export const getIdFromURL = (url: string) => {
const id = Number(url.split("/")?.pop()?.split("?")?.[0]);
return id;
};