Buckets:
| exports.id=3940,exports.ids=[3940],exports.modules={18265:a=>{var b=function(){"use strict";var a,b,c;function d(a,b){return null!=b&&a instanceof b}try{a=Map}catch(b){a=function(){}}try{b=Set}catch(a){b=function(){}}try{c=Promise}catch(a){c=function(){}}function e(f,h,i,j,k){"object"==typeof h&&(i=h.depth,j=h.prototype,k=h.includeNonEnumerable,h=h.circular);var l=[],m=[],n="undefined"!=typeof Buffer;return void 0===h&&(h=!0),void 0===i&&(i=1/0),function f(i,o){if(null===i)return null;if(0===o||"object"!=typeof i)return i;if(d(i,a))p=new a;else if(d(i,b))p=new b;else if(d(i,c))p=new c(function(a,b){i.then(function(b){a(f(b,o-1))},function(a){b(f(a,o-1))})});else if(e.__isArray(i))p=[];else if(e.__isRegExp(i))p=new RegExp(i.source,g(i)),i.lastIndex&&(p.lastIndex=i.lastIndex);else if(e.__isDate(i))p=new Date(i.getTime());else{if(n&&Buffer.isBuffer(i))return p=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(p),p;d(i,Error)?p=Object.create(i):void 0===j?p=Object.create(q=Object.getPrototypeOf(i)):(p=Object.create(j),q=j)}if(h){var p,q,r,s=l.indexOf(i);if(-1!=s)return m[s];l.push(i),m.push(p)}for(var t in d(i,a)&&i.forEach(function(a,b){var c=f(b,o-1),d=f(a,o-1);p.set(c,d)}),d(i,b)&&i.forEach(function(a){var b=f(a,o-1);p.add(b)}),i)q&&(r=Object.getOwnPropertyDescriptor(q,t)),r&&null==r.set||(p[t]=f(i[t],o-1));if(Object.getOwnPropertySymbols)for(var u=Object.getOwnPropertySymbols(i),t=0;t<u.length;t++){var v=u[t],w=Object.getOwnPropertyDescriptor(i,v);(!w||w.enumerable||k)&&(p[v]=f(i[v],o-1),w.enumerable||Object.defineProperty(p,v,{enumerable:!1}))}if(k)for(var x=Object.getOwnPropertyNames(i),t=0;t<x.length;t++){var y=x[t],w=Object.getOwnPropertyDescriptor(i,y);w&&w.enumerable||(p[y]=f(i[y],o-1),Object.defineProperty(p,y,{enumerable:!1}))}return p}(f,i)}function f(a){return Object.prototype.toString.call(a)}function g(a){var b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),b}return e.clonePrototype=function(a){if(null===a)return null;var b=function(){};return b.prototype=a,new b},e.__objToStr=f,e.__isDate=function(a){return"object"==typeof a&&"[object Date]"===f(a)},e.__isArray=function(a){return"object"==typeof a&&"[object Array]"===f(a)},e.__isRegExp=function(a){return"object"==typeof a&&"[object RegExp]"===f(a)},e.__getRegExpFlags=g,e}();a.exports&&(a.exports=b)},43071:function(a,b,c){(function(){var b,d,e=[].splice,f=function(a,b){if(!(a instanceof b))throw Error("Bound instance method accessed before binding")},g=[].indexOf;d=c(18265),b=c(94735).EventEmitter,a.exports=(function(){class a extends b{constructor(a={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=a,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(a=>{var b;b=this[a],this[a]=function(...a){var c,d,f;if(d=a,[...a]=d,[c]=e.call(a,-1),"function"!=typeof c)return b(...a,c);try{f=b(...a),c(null,f)}catch(a){c(a)}}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData();return}get(b){var c;if(f(this,a),null!=(c=this._isInvalidKey(b)))throw c;return null!=this.data[b]&&this._check(b,this.data[b])?(this.stats.hits++,this._unwrap(this.data[b])):void this.stats.misses++}mget(b){var c,d,e,g,h;if(f(this,a),!Array.isArray(b))throw this._error("EKEYSTYPE");for(d=0,h={},g=b.length;d<g;d++){if(e=b[d],null!=(c=this._isInvalidKey(e)))throw c;null!=this.data[e]&&this._check(e,this.data[e])?(this.stats.hits++,h[e]=this._unwrap(this.data[e])):this.stats.misses++}return h}set(b,c,d){var e,g;if(f(this,a),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==d&&(d=this.options.stdTTL),null!=(e=this._isInvalidKey(b)))throw e;return g=!1,this.data[b]&&(g=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[b],!1))),this.data[b]=this._wrap(c,d),this.stats.vsize+=this._getValLength(c),!g&&(this.stats.ksize+=this._getKeyLength(b),this.stats.keys++),this.emit("set",b,c),!0}mset(b){var c,d,e,g,h,i,j,k,l;if(f(this,a),this.options.maxKeys>-1&&this.stats.keys+b.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(d=0,i=b.length;d<i;d++){if(h=b[d],{key:g,val:l,ttl:k}=h,k&&"number"!=typeof k)throw this._error("ETTLTYPE");if(null!=(c=this._isInvalidKey(g)))throw c}for(e=0,j=b.length;e<j;e++)h=b[e],({key:g,val:l,ttl:k}=h),this.set(g,l,k);return!0}del(b){var c,d,e,g,h,i;for(f(this,a),Array.isArray(b)||(b=[b]),c=0,e=0,h=b.length;e<h;e++){if(g=b[e],null!=(d=this._isInvalidKey(g)))throw d;null!=this.data[g]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[g],!1)),this.stats.ksize-=this._getKeyLength(g),this.stats.keys--,c++,i=this.data[g],delete this.data[g],this.emit("del",g,i.v))}return c}take(b){var c;return f(this,a),null!=(c=this.get(b))&&this.del(b),c}ttl(b,c){var d;if(f(this,a),c||(c=this.options.stdTTL),!b)return!1;if(null!=(d=this._isInvalidKey(b)))throw d;return!!(null!=this.data[b]&&this._check(b,this.data[b]))&&(c>=0?this.data[b]=this._wrap(this.data[b].v,c,!1):this.del(b),!0)}getTtl(b){var c;if(f(this,a),b){if(null!=(c=this._isInvalidKey(b)))throw c;return null!=this.data[b]&&this._check(b,this.data[b])?this.data[b].t:void 0}}keys(){return f(this,a),Object.keys(this.data)}has(b){return f(this,a),null!=this.data[b]&&this._check(b,this.data[b])}getStats(){return f(this,a),this.stats}flushAll(b=!0){f(this,a),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(b),this.emit("flush")}flushStats(){f(this,a),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){f(this,a),this._killCheckPeriod()}_checkData(b=!0){var c,d,e;for(c in f(this,a),d=this.data)e=d[c],this._check(c,e);b&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,b),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(b,c){var d;return f(this,a),d=!0,0!==c.t&&c.t<Date.now()&&(this.options.deleteOnExpire&&(d=!1,this.del(b)),this.emit("expired",b,this._unwrap(c))),d}_isInvalidKey(b){var c;if(f(this,a),c=typeof b,0>g.call(this.validKeyTypes,c))return this._error("EKEYTYPE",{type:typeof b})}_wrap(b,c,e=!0){var g;return f(this,a),this.options.useClones||(e=!1),g=Date.now(),{t:0===c?0:c?g+1e3*c:0===this.options.stdTTL?this.options.stdTTL:g+1e3*this.options.stdTTL,v:e?d(b):b}}_unwrap(a,b=!0){if(this.options.useClones||(b=!1),null!=a.v)if(b)return d(a.v);else return a.v;return null}_getKeyLength(a){return a.toString().length}_getValLength(b){if(f(this,a),"string"==typeof b)return b.length;if(this.options.forceString)return JSON.stringify(b).length;if(Array.isArray(b))return this.options.arrayValueSize*b.length;if("number"==typeof b)return 8;if("function"==typeof(null!=b?b.then:void 0))return this.options.promiseValueSize;else if("undefined"!=typeof Buffer&&null!==Buffer?Buffer.isBuffer(b):void 0)return b.length;else if(null!=b&&"object"==typeof b)return this.options.objectValueSize*Object.keys(b).length;else if("boolean"==typeof b)return 8;else return 0}_error(b,c={}){var d;return f(this,a),(d=Error()).name=b,d.errorcode=b,d.message=null!=this.ERRORS[b]?this.ERRORS[b](c):"-",d.data=c,d}_initErrors(){var b,c,d;for(c in f(this,a),this.ERRORS={},d=this._ERRORS)b=d[c],this.ERRORS[c]=this.createErrorMessage(b)}createErrorMessage(a){return function(b){return a.replace("__key",b.type)}}}return a.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},a}).call(this)}).call(this)},93940:function(a,b,c){(function(){(a.exports=c(43071)).version="5.1.2"}).call(this)}}; |
Xet Storage Details
- Size:
- 8.97 kB
- Xet hash:
- 7af9180c9de7b74ea99ef747cedd72ac0a8e4abd1c7fa7cd7a0b19cc2f31213e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.