huge-storage
Version:
optimize for web storage
1 lines • 7.86 kB
JavaScript
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.store=n():t.store=n()}(window,function(){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=40)}([function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,r){t.exports=!r(0)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){var r=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports={default:r(37),__esModule:!0}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(8),o=r(7);t.exports=function(t){return e(o(t))}},function(t,n,r){t.exports={default:r(38),__esModule:!0}},function(t,n,r){var e=r(7);t.exports=function(t){return Object(e(t))}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(3),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){var e=r(16)("keys"),o=r(15);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n,r){var e=r(6),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=e(t))<0?o(t+n,0):i(t,n)}},function(t,n,r){var e=r(6),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){var e=r(9),o=r(19),i=r(18);t.exports=function(t){return function(n,r,u){var c,f=e(n),s=o(f.length),a=i(u,s);if(t&&r!=r){for(;s>a;)if((c=f[a++])!=c)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===r)return t||a||0;return!t&&-1}}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(22),o=r(9),i=r(20)(!1),u=r(17)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),f=0,s=[];for(r in c)r!=u&&e(c,r)&&s.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~i(s,r)||s.push(r));return s}},function(t,n,r){var e=r(23),o=r(14);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){"use strict";var e=r(24),o=r(13),i=r(12),u=r(11),c=r(8),f=Object.assign;t.exports=!f||r(0)(function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach(function(t){n[t]=t}),7!=f({},t)[r]||Object.keys(f({},n)).join("")!=e})?function(t,n){for(var r=u(t),f=arguments.length,s=1,a=o.f,p=i.f;f>s;)for(var l,d=c(arguments[s++]),v=a?e(d).concat(a(d)):e(d),y=v.length,h=0;y>h;)p.call(d,l=v[h++])&&(r[l]=d[l]);return r}:f},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(2),o=r(3).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){t.exports=!r(1)&&!r(0)(function(){return 7!=Object.defineProperty(r(28)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(2);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n,r){var e=r(30),o=r(29),i=r(27),u=Object.defineProperty;n.f=r(1)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(31),o=r(26);t.exports=r(1)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(33);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n,r){var e=r(3),o=r(4),i=r(34),u=r(32),c=function(t,n,r){var f,s,a,p=t&c.F,l=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,h=t&c.W,b=l?o:o[n]||(o[n]={}),x=b.prototype,g=l?e:d?e[n]:(e[n]||{}).prototype;for(f in l&&(r=n),r)(s=!p&&g&&void 0!==g[f])&&f in b||(a=s?g[f]:r[f],b[f]=l&&"function"!=typeof g[f]?r[f]:y&&s?i(a,e):h&&g[f]==a?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(a):v&&"function"==typeof a?i(Function.call,a):a,v&&((b.virtual||(b.virtual={}))[f]=a,t&c.R&&x&&!x[f]&&u(x,f,a)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,r){var e=r(35);e(e.S+e.F,"Object",{assign:r(25)})},function(t,n,r){r(36),t.exports=r(4).Object.assign},function(t,n,r){var e=r(4),o=e.JSON||(e.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,n){t.exports=function(t){if(!t.webpackPolyfill){var n=Object.create(t);n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),Object.defineProperty(n,"exports",{enumerable:!0}),n.webpackPolyfill=1}return n}},function(t,n,r){"use strict";r.r(n),function(t){var e=r(10),o=r.n(e),i=r(5),u=r.n(i),c={storage:window.localStorage,session:{storage:window.sessionStorage}},f={set:function(t,n){if(!this.disabled)return void 0===n?this.remove(t):(this.storage.setItem(t,function(t){return o()(t)}(n)),n)},get:function(t,n){if(this.disabled)return n;var r=function(t){if("string"!=typeof t)return;try{return JSON.parse(t)}catch(n){return t||void 0}}(this.storage.getItem(t));return void 0===r?n:r},has:function(t){return void 0!==this.get(t)},remove:function(t){this.disabled||this.storage.removeItem(t)},clear:function(){this.disabled||this.storage.clear()},getAll:function(){if(this.disabled)return null;var t={};return this.forEach(function(n,r){t[n]=r}),t},forEach:function(t){if(!this.disabled)for(var n=0;n<this.storage.length;n++){var r=this.storage.key(n);t(r,this.get(r))}}};u()(c,f),u()(c.session,f);try{var s="__storejs__";c.set(s,s),c.get(s)!==s&&(c.disabled=!0),c.remove(s)}catch(t){c.disabled=!0}n.default=c,t.exports=exports.default}.call(this,r(39)(t))}])});