Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cd466c5

Browse files
authored
Unnecessary escape characters in cookie.js
Removed unnecessary escape characters from regex in "getCookie function in cookie.js" - . ( ) [ / + The above characters don't need escaping.
1 parent 9680c67 commit cd466c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎6-data-storage/01-cookie/cookie.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function getCookie(name) {
22
let matches = document.cookie.match(new RegExp(
3-
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\1ドル') + "=([^;]*)"
3+
"(?:^|; )" + name.replace(/([.$?*|{}()[\]\\/+^])/g, '\\1ドル') + "=([^;]*)"
44
));
55
return matches ? decodeURIComponent(matches[1]) : undefined;
66
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /