{"size": 4021, "ext": "js", "max_stars_repo_path": "node_modules/bower/node_modules/lru-cache/lib/lru-cache.js", "max_stars_repo_name": "clapierre/clapierre.github.io", "max_stars_repo_stars_event_min_datetime": "2020-02-18T02:17:57.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-18T02:17:57.000Z", "max_issues_repo_path": "minified/node_modules/bower/node_modules/lru-cache/lib/lru-cache.js", "max_issues_repo_name": "benetech/forms", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "minified/node_modules/bower/node_modules/lru-cache/lib/lru-cache.js", "max_forks_repo_name": "benetech/forms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 4021.0, "max_line_length": 4021, "alphanum_fraction": 0.7343944292}
(function(){if(typeof module==="object"&&module.exports){module.exports=g}else{this.LRUCache=g}function h(k,j){return Object.prototype.hasOwnProperty.call(k,j)}function d(){return 1}function g(j){if(!(this instanceof g)){return new g(j)}if(typeof j==="number"){j={max:j}}if(!j){j={}}this._max=j.max;if(!this._max||!(typeof this._max==="number")||this._max<=0){this._max=Infinity}this._lengthCalculator=j.length||d;if(typeof this._lengthCalculator!=="function"){this._lengthCalculator=d}this._allowStale=j.stale||false;this._maxAge=j.maxAge||null;this._dispose=j.dispose;this.reset()}Object.defineProperty(g.prototype,"max",{set:function(j){if(!j||!(typeof j==="number")||j<=0){j=Infinity}this._max=j;if(this._length>this._max){c(this)}},get:function(){return this._max},enumerable:true});Object.defineProperty(g.prototype,"lengthCalculator",{set:function(k){if(typeof k!=="function"){this._lengthCalculator=d;this._length=this._itemCount;for(var j in this._cache){this._cache[j].length=1}}else{this._lengthCalculator=k;this._length=0;for(var j in this._cache){this._cache[j].length=this._lengthCalculator(this._cache[j].value);this._length+=this._cache[j].length}}if(this._length>this._max){c(this)}},get:function(){return this._lengthCalculator},enumerable:true});Object.defineProperty(g.prototype,"length",{get:function(){return this._length},enumerable:true});Object.defineProperty(g.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:true});g.prototype.forEach=function(n,m){m=m||this;var l=0;for(var j=this._mru-1;j>=0&&l<this._itemCount;j--){if(this._lruList[j]){l++;var o=this._lruList[j];if(this._maxAge&&(Date.now()-o.now>this._maxAge)){i(this,o);if(!this._allowStale){o=undefined}}if(o){n.call(m,o.value,o.key,this)}}}};g.prototype.keys=function(){var m=new Array(this._itemCount);var l=0;for(var j=this._mru-1;j>=0&&l<this._itemCount;j--){if(this._lruList[j]){var n=this._lruList[j];m[l++]=n.key}}return m};g.prototype.values=function(){var l=new Array(this._itemCount);var m=0;for(var j=this._mru-1;j>=0&&m<this._itemCount;j--){if(this._lruList[j]){var n=this._lruList[j];l[m++]=n.value}}return l};g.prototype.reset=function(){if(this._dispose&&this._cache){for(var j in this._cache){this._dispose(j,this._cache[j].value)}}this._cache=Object.create(null);this._lruList=Object.create(null);this._mru=0;this._lru=0;this._length=0;this._itemCount=0};g.prototype.dump=function(){return this._cache};g.prototype.dumpLru=function(){return this._lruList};g.prototype.set=function(l,n){if(h(this._cache,l)){if(this._dispose){this._dispose(l,this._cache[l].value)}if(this._maxAge){this._cache[l].now=Date.now()}this._cache[l].value=n;this.get(l);return true}var j=this._lengthCalculator(n);var k=this._maxAge?Date.now():0;var m=new f(l,n,this._mru++,j,k);if(m.length>this._max){if(this._dispose){this._dispose(l,n)}return false}this._length+=m.length;this._lruList[m.lu]=this._cache[l]=m;this._itemCount++;if(this._length>this._max){c(this)}return true};g.prototype.has=function(j){if(!h(this._cache,j)){return false}var k=this._cache[j];if(this._maxAge&&(Date.now()-k.now>this._maxAge)){return false}return true};g.prototype.get=function(j){return b(this,j,true)};g.prototype.peek=function(j){return b(this,j,false)};g.prototype.pop=function(){var j=this._lruList[this._lru];i(this,j);return j||null};g.prototype.del=function(j){i(this,this._cache[j])};function b(k,l,j){var m=k._cache[l];if(m){if(k._maxAge&&(Date.now()-m.now>k._maxAge)){i(k,m);if(!k._allowStale){m=undefined}}else{if(j){a(k,m)}}if(m){m=m.value}}return m}function a(j,k){e(j,k);k.lu=j._mru++;if(j._maxAge){k.now=Date.now()}j._lruList[k.lu]=k}function c(j){while(j._lru<j._mru&&j._length>j._max){i(j,j._lruList[j._lru])}}function e(j,k){delete j._lruList[k.lu];while(j._lru<j._mru&&!j._lruList[j._lru]){j._lru++}}function i(j,k){if(k){if(j._dispose){j._dispose(k.key,k.value)}j._length-=k.length;j._itemCount--;delete j._cache[k.key];e(j,k)}}function f(k,m,n,l,j){this.key=k;this.value=m;this.lu=n;this.length=l;this.now=j}})();