mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
9 lines
205 B
TypeScript
9 lines
205 B
TypeScript
export const getCookie = (name: string): string | undefined => {
|
|
const value = `; ${document.cookie}`;
|
|
const parts = value.split(`; ${name}=`);
|
|
|
|
if (parts.length === 2) {
|
|
return parts[1];
|
|
}
|
|
};
|