--------- Co-authored-by: Joep <jcbuhre@gmail.com> Co-authored-by: Omar Hussein <omarmohammad1951@gmail.com> Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
7 lines
179 B
TypeScript
7 lines
179 B
TypeScript
export default function (name: string) {
|
|
const re = new RegExp(
|
|
"(?:(?:^|.*;\\s*)" + name + "\\s*\\=\\s*([^;]*).*$)|^.*$"
|
|
);
|
|
return document.cookie.replace(re, "$1");
|
|
}
|