Speedometer: Update the Flight.js implementation to a more recent library version
[WebKit-https.git] / PerformanceTests / Speedometer / resources / todomvc / dependency-examples / flight / flight / node_modules / memorystorage / memorystorage.js
1 /*! memorystorage 0.11.0 ©2016 by Stijn de Witt and contributors. Some rights reserved. License: CC-BY-4.0 */
2 !function(u,m,d){"function"==typeof define&&define.amd?define("memorystorage",[],function(){return d()}):"object"==typeof exports?module.exports=d():u[m]=d()}(this,"MemoryStorage",function(){"use strict";function MemoryStorage(c){function e(){return Object.keys(h).filter(function(b){return!(b in a)})}function f(){return Object.keys(i)}function g(){return e().concat(f())}c=c||"global";var h=b[c];if(h)return h;if(!(this instanceof MemoryStorage))return new MemoryStorage(c);h=b[c]=this;var i={};return Object.defineProperty(h,"id",{enumerable:!0,configurable:!0,value:c}),Object.defineProperty(h,"length",{enumerable:!0,configurable:!0,get:function(){return g().length}}),h.getItem=function(b){return(b in a?i[b]:this[b])||null},h.setItem=function(b,c){b in a?i[b]=c:this[b]=c},h.removeItem=function(b){b in a?delete i[b]:delete this[b]},h.key=function(a){var b=g();return a>=0&&a<b.length?b[a]:null},h.clear=function(){for(var a,b=e(),c=0;a=b[c];c++)delete this[a];b=f();for(var a,c=0;a=b[c];c++)delete i[a]},"undefined"==typeof Proxy?h:new Proxy(h,{ownKeys:function(){return g()}})}var a={clear:1,getItem:1,id:1,key:1,length:1,removeItem:1,setItem:1},b={};return MemoryStorage});
3 //# sourceMappingURL=memorystorage.min.js.map