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

4 years ago
4 years ago
  1. class Cookie {
  2. /**
  3. * alternative: get cookie by name with using a regular expression
  4. */
  5. static getByName(name: string) {
  6. const pair = document.cookie.match(new RegExp(name + '=([^;]+)'));
  7. return !!pair ? pair[1] : null;
  8. }
  9. }
  10. export default Cookie;