Skip to content

Commit

Permalink
AC-9696:Upgade js-cookie/js.cookie.js dependency (v3.0.5) to the late…
Browse files Browse the repository at this point in the history
…st version
  • Loading branch information
glo17680 committed Oct 10, 2023
1 parent 9fe5810 commit b059ac4
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/web/js-cookie/js.cookie.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*! js-cookie v3.0.1 | MIT */
/*! js-cookie v3.0.5 | MIT */
;
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, (function () {
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
var current = global.Cookies;
var exports = global.Cookies = factory();
exports.noConflict = function () { global.Cookies = current; return exports; };
}()));
}(this, (function () { 'use strict';
})());
})(this, (function () { 'use strict';

/* eslint-disable no-var */
function assign (target) {
Expand Down Expand Up @@ -42,7 +42,7 @@
/* eslint-disable no-var */

function init (converter, defaultAttributes) {
function set (key, value, attributes) {
function set (name, value, attributes) {
if (typeof document === 'undefined') {
return
}
Expand All @@ -56,7 +56,7 @@
attributes.expires = attributes.expires.toUTCString();
}

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

Expand All @@ -83,11 +83,11 @@
}

return (document.cookie =
key + '=' + converter.write(value, key) + stringifiedAttributes)
name + '=' + converter.write(value, name) + stringifiedAttributes)
}

function get (key) {
if (typeof document === 'undefined' || (arguments.length && !key)) {
function get (name) {
if (typeof document === 'undefined' || (arguments.length && !name)) {
return
}

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

try {
var foundKey = decodeURIComponent(parts[0]);
jar[foundKey] = converter.read(value, foundKey);
var found = decodeURIComponent(parts[0]);
jar[found] = converter.read(value, found);

if (key === foundKey) {
if (name === found) {
break
}
} catch (e) {}
}

return key ? jar[key] : jar
return name ? jar[name] : jar
}

return Object.create(
{
set: set,
get: get,
remove: function (key, attributes) {
set,
get,
remove: function (name, attributes) {
set(
key,
name,
'',
assign({}, attributes, {
expires: -1
Expand All @@ -144,4 +144,4 @@

return api;

})));
}));

0 comments on commit b059ac4

Please sign in to comment.