Skip to content

Commit b059ac4

Browse files
committed
AC-9696:Upgade js-cookie/js.cookie.js dependency (v3.0.5) to the latest version
1 parent 9fe5810 commit b059ac4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

lib/web/js-cookie/js.cookie.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
/*! js-cookie v3.0.1 | MIT */
1+
/*! js-cookie v3.0.5 | MIT */
22
;
33
(function (global, factory) {
44
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
55
typeof define === 'function' && define.amd ? define(factory) :
6-
(global = global || self, (function () {
6+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
77
var current = global.Cookies;
88
var exports = global.Cookies = factory();
99
exports.noConflict = function () { global.Cookies = current; return exports; };
10-
}()));
11-
}(this, (function () { 'use strict';
10+
})());
11+
})(this, (function () { 'use strict';
1212

1313
/* eslint-disable no-var */
1414
function assign (target) {
@@ -42,7 +42,7 @@
4242
/* eslint-disable no-var */
4343

4444
function init (converter, defaultAttributes) {
45-
function set (key, value, attributes) {
45+
function set (name, value, attributes) {
4646
if (typeof document === 'undefined') {
4747
return
4848
}
@@ -56,7 +56,7 @@
5656
attributes.expires = attributes.expires.toUTCString();
5757
}
5858

59-
key = encodeURIComponent(key)
59+
name = encodeURIComponent(name)
6060
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
6161
.replace(/[()]/g, escape);
6262

@@ -83,11 +83,11 @@
8383
}
8484

8585
return (document.cookie =
86-
key + '=' + converter.write(value, key) + stringifiedAttributes)
86+
name + '=' + converter.write(value, name) + stringifiedAttributes)
8787
}
8888

89-
function get (key) {
90-
if (typeof document === 'undefined' || (arguments.length && !key)) {
89+
function get (name) {
90+
if (typeof document === 'undefined' || (arguments.length && !name)) {
9191
return
9292
}
9393

@@ -100,25 +100,25 @@
100100
var value = parts.slice(1).join('=');
101101

102102
try {
103-
var foundKey = decodeURIComponent(parts[0]);
104-
jar[foundKey] = converter.read(value, foundKey);
103+
var found = decodeURIComponent(parts[0]);
104+
jar[found] = converter.read(value, found);
105105

106-
if (key === foundKey) {
106+
if (name === found) {
107107
break
108108
}
109109
} catch (e) {}
110110
}
111111

112-
return key ? jar[key] : jar
112+
return name ? jar[name] : jar
113113
}
114114

115115
return Object.create(
116116
{
117-
set: set,
118-
get: get,
119-
remove: function (key, attributes) {
117+
set,
118+
get,
119+
remove: function (name, attributes) {
120120
set(
121-
key,
121+
name,
122122
'',
123123
assign({}, attributes, {
124124
expires: -1
@@ -144,4 +144,4 @@
144144

145145
return api;
146146

147-
})));
147+
}));

0 commit comments

Comments
 (0)