@haikel/min-cookie
Advanced tools
Comparing version 1.0.6 to 1.0.7
parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({"A2T1":[function(require,module,exports) { | ||
"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var o=function(){function n(){t(this,n)}return r(n,[{key:"set",value:function(e,t,n){if(!this.check(e)){var r=new Date;r.setTime(r.getTime()+1e3*t*60*60*24);var o="expires="+r.toGMTString();return document.cookie="".concat(e," = ").concat(JSON.stringify(n)," ; ").concat(o," ;path=/"),!0}return!1}},{key:"get",value:function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return JSON.parse(o.substring(t.length,o.length))}return""}},{key:"check",value:function(t){return!("object"!==e(this.get(t))||!this.get(t))}},{key:"remove",value:function(e){if(this.check(e)){var t=new Date,n="expires="+t.toGMTString();return t.setTime(t.getTime()-864e5),window.document.cookie=e+"=; "+n,!0}return!1}}]),n}(),i=new o;exports.default=i; | ||
"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function o(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=function(){function n(){t(this,n)}return o(n,[{key:"set",value:function(e,t,n,o){if(!this.check(e)){n=n.map(function(e){return encodeURIComponent(e)});var r=new Date;r.setTime(r.getTime()+1e3*t*60*60*24);var i="expires="+r.toGMTString();return document.cookie="".concat(e," = ").concat(JSON.stringify(n)," ; ").concat(i," ;path=").concat(o),!0}return!1}},{key:"get",value:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return JSON.parse(r.substring(t.length,r.length)).map(function(e){return decodeURIComponent(e)})}return""}},{key:"check",value:function(t){return!("object"!==e(this.get(t))||!this.get(t))}},{key:"remove",value:function(e){if(this.check(e)){var t=new Date,n="expires="+t.toGMTString();return t.setTime(t.getTime()-864e5),window.document.cookie=e+"=; "+n,!0}return!1}}]),n}(),i=new r;exports.default=i; | ||
},{}]},{},["A2T1"], null) | ||
//# sourceMappingURL=/app.map |
{ | ||
"name": "@haikel/min-cookie", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A simple, lightweight JavaScript package for handling browser cookies", | ||
"main": "app.js", | ||
"scripts": { | ||
"dev": "parcel src/app.js", | ||
"build": "parcel build src/app.js", | ||
"example": "parcel examples/index.html" | ||
"test": "test app.js" | ||
}, | ||
@@ -11,0 +9,0 @@ "keywords": [ |
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
7873