@gilbarbara/cookies
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -15,3 +15,3 @@ /*! ***************************************************************************** | ||
***************************************************************************** */ | ||
var e=function(){return e=Object.assign||function(e){for(var o,n=1,r=arguments.length;n<r;n++)for(var t in o=arguments[n])Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},e.apply(this,arguments)};function o(e,o){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,t,c=n.call(e),i=[];try{for(;(void 0===o||o-- >0)&&!(r=c.next()).done;)i.push(r.value)}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return i}var n=function(e){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape)},r=function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent)},t=decodeURIComponent,c=function(e){var o=e;return'"'===o[0]&&(o=o.slice(1,-1)),o.replace(/(%[\da-f]{2})+/gi,decodeURIComponent)},i={expires:30,path:"/"},a=Object.freeze({__proto__:null});function u(e,o,n){for(var r=/(?:^|; )([^=]*)=([^;]*)/g,t={},c=r.exec(document.cookie);c;){try{var i=n(c[1]);if(t[i]=o(c[2],i),e===i)break}catch(e){}c=r.exec(document.cookie)}return null!=e?t[e]:t}function d(e,o){var n=void 0===o?{}:o,r=n.decodeValue,i=void 0===r?c:r,a=n.decodeName;return u(e,i,void 0===a?t:a)}function p(e){var o=void 0===e?{}:e,n=o.decodeValue,r=void 0===n?c:n,i=o.decodeName;return u(void 0,r,void 0===i?t:i)}function l(o,n){void 0===n&&(n=i),f(o,"",e(e({},n),{expires:-1}))}function f(t,c,a,u){void 0===a&&(a=i),void 0===u&&(u={});var d=u.encodeValue,p=void 0===d?r:d,l=u.encodeName,f="".concat((void 0===l?n:l)(t),"=").concat(p(c,t)).concat(function(n){var r=e({},n);return"number"==typeof r.expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),Object.entries(r).filter((function(e){var n=o(e,2)[1];return null!=n&&!1!==n})).map((function(e){var n=o(e,2),r=n[0],t=n[1];return!0===t?"; ".concat(r):"; ".concat(r,"=").concat(t.split(";")[0])})).join("")}(a));return document.cookie=f,f}export{a as Types,d as getCookie,p as getCookies,l as removeCookie,f as setCookie}; | ||
var e=function(){return e=Object.assign||function(e){for(var o,n=1,r=arguments.length;n<r;n++)for(var t in o=arguments[n])Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},e.apply(this,arguments)},o=function(e){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape)},n=function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent)},r=decodeURIComponent,t=function(e){var o=e;return'"'===o[0]&&(o=o.slice(1,-1)),o.replace(/(%[\da-f]{2})+/gi,decodeURIComponent)},c={expires:30,path:"/"},i=Object.freeze({__proto__:null});function a(e,o,n){for(var r=/(?:^|; )([^=]*)=([^;]*)/g,t={},c=r.exec(document.cookie);c;){try{var i=n(c[1]);if(t[i]=o(c[2],i),e===i)break}catch(e){}c=r.exec(document.cookie)}return null!=e?t[e]:t}function d(e,o){var n=void 0===o?{}:o,c=n.decodeValue,i=void 0===c?t:c,d=n.decodeName;return a(e,i,void 0===d?r:d)}function u(e){var o=void 0===e?{}:e,n=o.decodeValue,c=void 0===n?t:n,i=o.decodeName;return a(void 0,c,void 0===i?r:i)}function p(o,n){void 0===n&&(n=c),v(o,"",e(e({},n),{expires:-1}))}function v(r,t,i,a){void 0===i&&(i=c),void 0===a&&(a={});var d=a.encodeValue,u=void 0===d?n:d,p=a.encodeName,v="".concat((void 0===p?o:p)(r),"=").concat(u(t,r)).concat(function(o){var n=e({},o);return"number"==typeof n.expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),Object.entries(n).filter((function(e){var o=e[1];return null!=o&&!1!==o})).map((function(e){var o=e[0],n=e[1];return!0===n?"; ".concat(o):"; ".concat(o,"=").concat(n.split(";")[0])})).join("")}(i));return document.cookie=v,v}export{i as Types,d as getCookie,u as getCookies,p as removeCookie,v as setCookie}; | ||
//# sourceMappingURL=index.js.map |
@@ -16,3 +16,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}); | ||
***************************************************************************** */ | ||
var e=function(){return e=Object.assign||function(e){for(var o,r=1,n=arguments.length;r<n;r++)for(var t in o=arguments[r])Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},e.apply(this,arguments)};function o(e,o){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,t,c=r.call(e),i=[];try{for(;(void 0===o||o-- >0)&&!(n=c.next()).done;)i.push(n.value)}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return i}var r=function(e){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape)},n=function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent)},t=decodeURIComponent,c=function(e){var o=e;return'"'===o[0]&&(o=o.slice(1,-1)),o.replace(/(%[\da-f]{2})+/gi,decodeURIComponent)},i={expires:30,path:"/"},a=Object.freeze({__proto__:null});function u(e,o,r){for(var n=/(?:^|; )([^=]*)=([^;]*)/g,t={},c=n.exec(document.cookie);c;){try{var i=r(c[1]);if(t[i]=o(c[2],i),e===i)break}catch(e){}c=n.exec(document.cookie)}return null!=e?t[e]:t}function d(t,c,a,u){void 0===a&&(a=i),void 0===u&&(u={});var d=u.encodeValue,p=void 0===d?n:d,l=u.encodeName,v="".concat((void 0===l?r:l)(t),"=").concat(p(c,t)).concat(function(r){var n=e({},r);return"number"==typeof n.expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),Object.entries(n).filter((function(e){var r=o(e,2)[1];return null!=r&&!1!==r})).map((function(e){var r=o(e,2),n=r[0],t=r[1];return!0===t?"; ".concat(n):"; ".concat(n,"=").concat(t.split(";")[0])})).join("")}(a));return document.cookie=v,v}exports.Types=a,exports.getCookie=function(e,o){var r=void 0===o?{}:o,n=r.decodeValue,i=void 0===n?c:n,a=r.decodeName;return u(e,i,void 0===a?t:a)},exports.getCookies=function(e){var o=void 0===e?{}:e,r=o.decodeValue,n=void 0===r?c:r,i=o.decodeName;return u(void 0,n,void 0===i?t:i)},exports.removeCookie=function(o,r){void 0===r&&(r=i),d(o,"",e(e({},r),{expires:-1}))},exports.setCookie=d; | ||
var e=function(){return e=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var r in o=arguments[n])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},e.apply(this,arguments)},o=function(e){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape)},n=function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent)},t=decodeURIComponent,r=function(e){var o=e;return'"'===o[0]&&(o=o.slice(1,-1)),o.replace(/(%[\da-f]{2})+/gi,decodeURIComponent)},c={expires:30,path:"/"},i=Object.freeze({__proto__:null});function a(e,o,n){for(var t=/(?:^|; )([^=]*)=([^;]*)/g,r={},c=t.exec(document.cookie);c;){try{var i=n(c[1]);if(r[i]=o(c[2],i),e===i)break}catch(e){}c=t.exec(document.cookie)}return null!=e?r[e]:r}function d(t,r,i,a){void 0===i&&(i=c),void 0===a&&(a={});var d=a.encodeValue,u=void 0===d?n:d,p=a.encodeName,s="".concat((void 0===p?o:p)(t),"=").concat(u(r,t)).concat(function(o){var n=e({},o);return"number"==typeof n.expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),Object.entries(n).filter((function(e){var o=e[1];return null!=o&&!1!==o})).map((function(e){var o=e[0],n=e[1];return!0===n?"; ".concat(o):"; ".concat(o,"=").concat(n.split(";")[0])})).join("")}(i));return document.cookie=s,s}exports.Types=i,exports.getCookie=function(e,o){var n=void 0===o?{}:o,c=n.decodeValue,i=void 0===c?r:c,d=n.decodeName;return a(e,i,void 0===d?t:d)},exports.getCookies=function(e){var o=void 0===e?{}:e,n=o.decodeValue,c=void 0===n?r:n,i=o.decodeName;return a(void 0,c,void 0===i?t:i)},exports.removeCookie=function(o,n){void 0===n&&(n=c),d(o,"",e(e({},n),{expires:-1}))},exports.setCookie=d; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@gilbarbara/cookies", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A lightweight API for handling cookies in the browser", | ||
@@ -50,3 +50,2 @@ "author": "Gil Barbara <gilbarbara@gmail.com>", | ||
"rollup": "^2.68.0", | ||
"rollup-plugin-exclude-dependencies-from-bundle": "^1.1.22", | ||
"rollup-plugin-filesize": "^9.1.2", | ||
@@ -53,0 +52,0 @@ "rollup-plugin-license": "^2.6.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26
58944
403