Repo for the search and displace core module including the interface to select files and search and displace operations to run on them.
https://searchanddisplace.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
287 B
12 lines
287 B
class Cookie {
|
|
/**
|
|
* alternative: get cookie by name with using a regular expression
|
|
*/
|
|
static getByName(name: string) {
|
|
const pair = document.cookie.match(new RegExp(name + '=([^;]+)'));
|
|
|
|
return !!pair ? pair[1] : null;
|
|
}
|
|
}
|
|
|
|
export default Cookie;
|