From f35feaba02c493fe281321a4616e5df08ffd28e2 Mon Sep 17 00:00:00 2001 From: Addy Osmani Date: Sat, 7 Feb 2015 21:33:46 +0000 Subject: [PATCH] Bump to 0.5.2. Rebuild releases. --- dist/basket.full.min.js | 4 ++-- dist/basket.full.min.js.map | 2 +- dist/basket.js | 21 +++++++++++++++++---- dist/basket.min.js | 4 ++-- dist/basket.min.js.map | 2 +- package.json | 2 +- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/dist/basket.full.min.js b/dist/basket.full.min.js index d356b10..14a7d9b 100644 --- a/dist/basket.full.min.js +++ b/dist/basket.full.min.js @@ -1,11 +1,11 @@ /*! * basket.js -* v0.5.1 - 2014-08-16 +* v0.5.2 - 2015-02-07 * http://addyosmani.github.com/basket.js * (c) Addy Osmani; License * Created by: Addy Osmani, Sindre Sorhus, Andrée Hansson, Mat Scales * Contributors: Ironsjp, Mathias Bynens, Rick Waldron, Felipe Morais * Uses rsvp.js, https://github.com/tildeio/rsvp.js */ -(function(){function a(a,b){if(a&&"object"==typeof a&&a.constructor===this)return a;var c=new this(h,b);return l(c,a),c}function b(a,b,c){1===Q.push({name:a,H:{M:b.q+b.r,L:a,detail:b.b,K:c&&b.q+c.r,label:b.u,timeStamp:O(),stack:Error(b.u).stack}})&&setTimeout(function(){for(var a,b=0;bc;c++)if(a[c]===b)return c;return-1}function d(a){var b=a.v;return b||(b=a.v={}),b}function e(a,b){if("onerror"===a)M.k("error",b);else{if(2!==arguments.length)return M[a];M[a]=b}}function f(a){return"function"==typeof a}function g(){}function h(){}function i(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function j(a,b,c){M.async(function(a){var d=!1,e=i(c,b,function(c){d||(d=!0,b!==c?l(a,c):n(a,c))},function(b){d||(d=!0,o(a,b))});!d&&e&&(d=!0,o(a,e))},a)}function k(a,b){1===b.a?n(a,b.b):2===a.a?o(a,b.b):p(b,void 0,function(c){b!==c?l(a,c):n(a,c)},function(b){o(a,b)})}function l(a,b){if(a===b)n(a,b);else if("function"==typeof b||"object"==typeof b&&null!==b)if(b.constructor===a.constructor)k(a,b);else{var c;try{c=b.then}catch(d){R.error=d,c=R}c===R?o(a,R.error):void 0===c?n(a,b):f(c)?j(a,b,c):n(a,b)}else n(a,b)}function m(a){a.d&&a.d(a.b),q(a)}function n(a,c){void 0===a.a&&(a.b=c,a.a=1,0===a.i.length?M.g&&b("fulfilled",a):M.async(q,a))}function o(a,b){void 0===a.a&&(a.a=2,a.b=b,M.async(m,a))}function p(a,b,c,d){var e=a.i,f=e.length;a.d=null,e[f]=b,e[f+1]=c,e[f+2]=d,0===f&&a.a&&M.async(q,a)}function q(a){var c=a.i,d=a.a;if(M.g&&b(1===d?"fulfilled":"rejected",a),0!==c.length){for(var e,f,g=a.b,h=0;ha;a+=2)_[a](_[a+1]),_[a]=void 0,_[a+1]=void 0;Z=0}function K(){M.k.apply(M,arguments)}var L={G:function(a){return a.k=this.k,a.n=this.n,a.l=this.l,a.v=void 0,a},k:function(a,b){var e,f=d(this);(e=f[a])||(e=f[a]=[]),-1===c(e,b)&&e.push(b)},n:function(a,b){var e,f=d(this);b?(f=f[a],e=c(f,b),-1!==e&&f.splice(e,1)):f[a]=[]},l:function(a,b){var c,e;if(c=d(this)[a])for(var f=0;fd;d++)this.o(c[d],d)},v.prototype.o=function(a,b){var c=this.B;"object"==typeof a&&null!==a?a.constructor===c&&void 0!==a.a?(a.d=null,this.m(a.a,b,a.b)):this.C(c.resolve(a),b):(this.e--,this.b[b]=this.h(1,b,a))},v.prototype.m=function(a,b,c){var d=this.c;void 0===d.a&&(this.e--,this.A&&2===a?o(d,c):this.b[b]=this.h(a,b,c)),0===this.e&&n(d,this.b)},v.prototype.h=function(a,b,c){return c},v.prototype.C=function(a,b){var c=this;p(a,void 0,function(a){c.m(1,b,a)},function(a){c.m(2,b,a)})};var T="rsvp_"+O()+"-",U=0,V=w;w.J=a,w.all=function(a,b){return new v(this,a,!0,b).c},w.race=function(a,b){function c(a){l(e,a)}function d(a){o(e,a)}var e=new this(h,b);if(!N(a))return o(e,new TypeError("You must pass an array to race.")),e;for(var f=a.length,g=0;void 0===e.a&&f>g;g++)p(this.resolve(a[g]),void 0,c,d);return e},w.resolve=a,w.reject=function(a,b){var c=new this(h,b);return o(c,a),c},w.prototype={constructor:w,q:T,d:function(a){M.l("error",a)},then:function(a,c,d){var e=this.a;if(1===e&&!a||2===e&&!c)return M.g&&b("chained",this,this),this;this.d=null;var f=new this.constructor(h,d),g=this.b;if(M.g&&b("chained",this,f),e){var i=arguments[e-1];M.async(function(){s(e,f,i,g)})}else p(this,f,a,c);return f},"catch":function(a,b){return this.then(null,a,b)}};var W=new x,X=new x;C.prototype=P(v.prototype),C.prototype.f=v,C.prototype.h=u,C.prototype.j=function(){return Error("allSettled must be called with an array")},D.prototype=P(v.prototype),D.prototype.f=v,D.prototype.s=function(){this.b={}},D.prototype.w=function(a){return a&&"object"==typeof a},D.prototype.j=function(){return Error("Promise.hash must be called with an object")},D.prototype.p=function(){var a,b=this.c,c=this.t,d=[];for(a in c)void 0===b.a&&c.hasOwnProperty(a)&&d.push({position:a,D:c[a]});this.e=c=d.length;for(var e=0;void 0===b.a&&c>e;e++)a=d[e],this.o(a.D,a.position)},E.prototype=P(D.prototype),E.prototype.f=v,E.prototype.h=u,E.prototype.j=function(){return Error("hashSettled must be called with an object")};var Y,Z=0,P="undefined"!=typeof window?window:{},$=P.MutationObserver||P.WebKitMutationObserver,P="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,_=Array(1e3);if(Y="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?F():$?G():P?H():I(),M.async=function(a,b){_[Z]=a,_[Z+1]=b,Z+=2,2===Z&&Y()},"undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){P=window.__PROMISE_INSTRUMENTATION__,e("instrument",!0);for(var ab in P)P.hasOwnProperty(ab)&&K(ab,P[ab])}var bb={race:function(a,b){return V.race(a,b)},Promise:V,allSettled:function(a,b){return new C(V,a,b).c},hash:function(a,b){return new D(V,a,b).c},hashSettled:function(a,b){return new E(V,a,b).c},denodeify:function(a,b){function c(){for(var c,d=arguments.length,e=Array(d+1),f=!1,g=0;d>g;++g){if(c=arguments[g],!f){if(c&&"object"==typeof c){var i;if(c.constructor===V)i=!0;else try{i=c.then}catch(j){W.value=j,i=W}f=i}else f=!1;if(f===X)return d=new V(h),o(d,X.value),d;f&&!0!==f&&(c=z(f,c))}e[g]=c}var k=new V(h);return e[d]=function(a,c){if(a)o(k,a);else if(void 0===b)l(k,c);else if(!0===b){for(var d=arguments,e=d.length,f=Array(e-1),g=1;e>g;g++)f[g-1]=d[g];l(k,f)}else if(N(b)){for(var f=arguments,d={},g=f.length,e=Array(g),h=0;g>h;h++)e[h]=f[h];for(g=0;gg;g++)e[g]=b(a[g]);return V.all(e,c)})},filter:function(a,b,c){return V.all(a,c).then(function(a){if(!f(b))throw new TypeError("You must pass a function as filter's second argument.");for(var d=a.length,e=Array(d),g=0;d>g;g++)e[g]=b(a[g]);return V.all(e,c).then(function(b){for(var c=Array(d),e=0,f=0;d>f;f++)b[f]&&(c[e]=a[f],e++);return c.length=e,c})})},resolve:function(a,b){return V.resolve(a,b)},reject:function(a,b){return V.reject(a,b)},all:function(a,b){return V.all(a,b)},rethrow:function(a){throw setTimeout(function(){throw a}),a},defer:function(a){var b={};return b.c=new V(function(a,c){b.resolve=a,b.reject=c},a),b},EventTarget:L,configure:e,async:function(a,b){M.async(a,b)}};"function"==typeof define&&define.I?define(function(){return bb}):"undefined"!=typeof module&&module.F?module.F=bb:"undefined"!=typeof this&&(this.RSVP=bb)}).call(this),function(a,b){"use strict";var c=b.head||b.getElementsByTagName("head")[0],d="basket-",e=5e3,f=function(a,b){try{return localStorage.setItem(d+a,JSON.stringify(b)),!0}catch(c){if(c.name.toUpperCase().indexOf("QUOTA")>=0){var e,g=[];for(e in localStorage)0===e.indexOf(d)&&g.push(JSON.parse(localStorage[e]));return g.length?(g.sort(function(a,b){return a.stamp-b.stamp}),basket.remove(g[0].key),f(a,b)):void 0}return}},g=function(a){var b=new RSVP.Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.onreadystatechange=function(){4===d.readyState&&(200===d.status?b({content:d.responseText,type:d.getResponseHeader("content-type")}):c(new Error(d.statusText)))},setTimeout(function(){d.readyState<4&&d.abort()},basket.timeout),d.send()});return b},h=function(a){return g(a.url).then(function(b){var c=i(a,b);return a.skipCache||f(a.key,c),c})},i=function(a,b){var c=+new Date;return a.data=b.content,a.originalType=b.type,a.type=a.type||b.type,a.skipCache=a.skipCache||!1,a.stamp=c,a.expire=c+60*(a.expire||e)*60*1e3,a},j=function(a,b){return!a||a.expire-+new Date<0||b.unique!==a.unique||basket.isValidItem&&!basket.isValidItem(a,b)},k=function(a){var b,c,d;if(a.url)return a.key=a.key||a.url,b=basket.get(a.key),a.execute=a.execute!==!1,d=j(b,a),a.live||d?(a.unique&&(a.url+=(a.url.indexOf("?")>0?"&":"?")+"basket-unique="+a.unique),c=h(a),a.live&&!d&&(c=c.then(function(a){return a},function(){return b}))):(b.type=a.type||b.originalType,c=new RSVP.Promise(function(a){a(b)})),c},l=function(a){var d=b.createElement("script");d.defer=!0,d.text=a.data,c.appendChild(d)},m={"default":l},n=function(a){return a.type&&m[a.type]?m[a.type](a):m["default"](a)},o=function(a){a.map(function(a){return a.execute&&n(a),a})},p=function(){var a,b,c=[];for(a=0,b=arguments.length;b>a;a++)c.push(k(arguments[a]));return RSVP.all(c)},q=function(){var a=p.apply(null,arguments),b=this.then(function(){return a}).then(o);return b.thenRequire=q,b};a.basket={require:function(){var a=p.apply(null,arguments).then(o);return a.thenRequire=q,a},remove:function(a){return localStorage.removeItem(d+a),this},get:function(a){var b=localStorage.getItem(d+a);try{return JSON.parse(b||"false")}catch(c){return!1}},clear:function(a){var b,c,e=+new Date;for(b in localStorage)c=b.split(d)[1],c&&(!a||this.get(c).expire<=e)&&this.remove(c);return this},isValidItem:null,timeout:5e3,addHandler:function(a,b){Array.isArray(a)||(a=[a]),a.forEach(function(a){m[a]=b})},removeHandler:function(a){basket.addHandler(a,void 0)}},basket.clear(!0)}(this,document); +(function(){"use strict";function a(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function b(a){var b=a._promiseCallbacks;return b||(b=a._promiseCallbacks={}),b}function c(a,b){return"onerror"===a?void rb.on("error",b):2!==arguments.length?rb[a]:void(rb[a]=b)}function d(a){return"function"==typeof a||"object"==typeof a&&null!==a}function e(a){return"function"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(){}function h(){setTimeout(function(){for(var a,b=0;bh;h++)u(e.resolve(a[h]),void 0,c,d);return f}function E(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(k,b);return q(d,a),d}function F(a,b){var c=this,d=new c(k,b);return t(d,a),d}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function I(a,b){this._id=Jb++,this._label=b,this._state=void 0,this._result=void 0,this._subscribers=[],rb.instrument&&xb("created",this),k!==a&&(e(a)||G(),this instanceof I||H(),z(this,a))}function J(){this.value=void 0}function K(a){try{return a.then}catch(b){return Lb.value=b,Lb}}function L(a,b,c){try{a.apply(b,c)}catch(d){return Lb.value=d,Lb}}function M(a,b){for(var c,d,e={},f=a.length,g=new Array(f),h=0;f>h;h++)g[h]=a[h];for(d=0;dd;d++)c[d-1]=a[d];return c}function O(a,b){return{then:function(c,d){return a.call(b,c,d)}}}function P(a,b){var c=function(){for(var c,d=this,e=arguments.length,f=new Array(e+1),g=!1,h=0;e>h;++h){if(c=arguments[h],!g){if(g=S(c),g===Mb){var i=new Kb(k);return t(i,Mb.value),i}g&&g!==!0&&(c=O(g,c))}f[h]=c}var j=new Kb(k);return f[e]=function(a,c){a?t(j,a):void 0===b?q(j,c):b===!0?q(j,N(arguments)):tb(b)?q(j,M(arguments,b)):q(j,c)},g?R(j,f,a,d):Q(j,f,a,d)};return c.__proto__=a,c}function Q(a,b,c,d){var e=L(c,d,b);return e===Lb&&t(a,e.value),a}function R(a,b,c,d){return Kb.all(b).then(function(b){var e=L(c,d,b);return e===Lb&&t(a,e.value),a})}function S(a){return a&&"object"==typeof a?a.constructor===Kb?!0:K(a):!1}function T(a,b){return Kb.all(a,b)}function U(a,b,c){this._superConstructor(a,b,!1,c)}function V(a,b){return new U(Kb,a,b).promise}function W(a,b){return Kb.race(a,b)}function X(a,b,c){this._superConstructor(a,b,!0,c)}function Y(a,b){return new Rb(Kb,a,b).promise}function Z(a,b,c){this._superConstructor(a,b,!1,c)}function $(a,b){return new Z(Kb,a,b).promise}function _(a){throw setTimeout(function(){throw a}),a}function ab(a){var b={};return b.promise=new Kb(function(a,c){b.resolve=a,b.reject=c},a),b}function bb(a,b,c){return Kb.all(a,c).then(function(a){if(!e(b))throw new TypeError("You must pass a function as map's second argument.");for(var d=a.length,f=new Array(d),g=0;d>g;g++)f[g]=b(a[g]);return Kb.all(f,c)})}function cb(a,b){return Kb.resolve(a,b)}function db(a,b){return Kb.reject(a,b)}function eb(a,b,c){return Kb.all(a,c).then(function(a){if(!e(b))throw new TypeError("You must pass a function as filter's second argument.");for(var d=a.length,f=new Array(d),g=0;d>g;g++)f[g]=b(a[g]);return Kb.all(f,c).then(function(b){for(var c=new Array(d),e=0,f=0;d>f;f++)b[f]&&(c[e]=a[f],e++);return c.length=e,c})})}function fb(a,b){gc[_b]=a,gc[_b+1]=b,_b+=2,2===_b&&Tb()}function gb(){var a=process.nextTick,b=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(b)&&"0"===b[1]&&"10"===b[2]&&(a=setImmediate),function(){a(lb)}}function hb(){return function(){vertxNext(lb)}}function ib(){var a=0,b=new dc(lb),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function jb(){var a=new MessageChannel;return a.port1.onmessage=lb,function(){a.port2.postMessage(0)}}function kb(){return function(){setTimeout(lb,1)}}function lb(){for(var a=0;_b>a;a+=2){var b=gc[a],c=gc[a+1];b(c),gc[a]=void 0,gc[a+1]=void 0}_b=0}function mb(){try{var a=require("vertx");return a.runOnLoop||a.runOnContext,hb()}catch(b){return kb()}}function nb(a,b){rb.async(a,b)}function ob(){rb.on.apply(rb,arguments)}function pb(){rb.off.apply(rb,arguments)}var qb={mixin:function(a){return a.on=this.on,a.off=this.off,a.trigger=this.trigger,a._promiseCallbacks=void 0,a},on:function(c,d){var e,f=b(this);e=f[c],e||(e=f[c]=[]),-1===a(e,d)&&e.push(d)},off:function(c,d){var e,f,g=b(this);return d?(e=g[c],f=a(e,d),void(-1!==f&&e.splice(f,1))):void(g[c]=[])},trigger:function(a,c){var d,e,f=b(this);if(d=f[a])for(var g=0;g1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return g.prototype=a,new g},wb=[],xb=i,yb=void 0,zb=1,Ab=2,Bb=new w,Cb=new w,Db=B;B.prototype._validateInput=function(a){return tb(a)},B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._init=function(){this._result=new Array(this.length)},B.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===yb&&a>d;d++)this._eachEntry(c[d],d)},B.prototype._eachEntry=function(a,b){var c=this._instanceConstructor;f(a)?a.constructor===c&&a._state!==yb?(a._onError=null,this._settledAt(a._state,b,a._result)):this._willSettleAt(c.resolve(a),b):(this._remaining--,this._result[b]=this._makeResult(zb,b,a))},B.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===yb&&(this._remaining--,this._abortOnReject&&a===Ab?t(d,c):this._result[b]=this._makeResult(a,b,c)),0===this._remaining&&s(d,this._result)},B.prototype._makeResult=function(a,b,c){return c},B.prototype._willSettleAt=function(a,b){var c=this;u(a,void 0,function(a){c._settledAt(zb,b,a)},function(a){c._settledAt(Ab,b,a)})};var Eb=C,Fb=D,Gb=E,Hb=F,Ib="rsvp_"+ub()+"-",Jb=0,Kb=I;I.cast=Gb,I.all=Eb,I.race=Fb,I.resolve=Gb,I.reject=Hb,I.prototype={constructor:I,_guidKey:Ib,_onError:function(a){rb.async(function(b){setTimeout(function(){b._onError&&rb.trigger("error",a)},0)},this)},then:function(a,b,c){var d=this,e=d._state;if(e===zb&&!a||e===Ab&&!b)return rb.instrument&&xb("chained",this,this),this;d._onError=null;var f=new this.constructor(k,c),g=d._result;if(rb.instrument&&xb("chained",d,f),e){var h=arguments[e-1];rb.async(function(){y(e,f,h,g)})}else u(d,f,a,b);return f},"catch":function(a,b){return this.then(null,a,b)},"finally":function(a,b){var c=this.constructor;return this.then(function(b){return c.resolve(a()).then(function(){return b})},function(b){return c.resolve(a()).then(function(){throw b})},b)}};var Lb=new J,Mb=new J,Nb=P,Ob=T;U.prototype=vb(Db.prototype),U.prototype._superConstructor=Db,U.prototype._makeResult=A,U.prototype._validationError=function(){return new Error("allSettled must be called with an array")};var Pb=V,Qb=W,Rb=X;X.prototype=vb(Db.prototype),X.prototype._superConstructor=Db,X.prototype._init=function(){this._result={}},X.prototype._validateInput=function(a){return a&&"object"==typeof a},X.prototype._validationError=function(){return new Error("Promise.hash must be called with an object")},X.prototype._enumerate=function(){var a=this.promise,b=this._input,c=[];for(var d in b)a._state===yb&&b.hasOwnProperty(d)&&c.push({position:d,entry:b[d]});var e=c.length;this._remaining=e;for(var f,g=0;a._state===yb&&e>g;g++)f=c[g],this._eachEntry(f.entry,f.position)};var Sb=Y;Z.prototype=vb(Rb.prototype),Z.prototype._superConstructor=Db,Z.prototype._makeResult=A,Z.prototype._validationError=function(){return new Error("hashSettled must be called with an object")};var Tb,Ub=$,Vb=_,Wb=ab,Xb=bb,Yb=cb,Zb=db,$b=eb,_b=0,ac=fb,bc="undefined"!=typeof window?window:void 0,cc=bc||{},dc=cc.MutationObserver||cc.WebKitMutationObserver,ec="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),fc="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,gc=new Array(1e3);if(Tb=ec?gb():dc?ib():fc?jb():void 0===bc&&"function"==typeof require?mb():kb(),rb.async=ac,"undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var hc=window.__PROMISE_INSTRUMENTATION__;c("instrument",!0);for(var ic in hc)hc.hasOwnProperty(ic)&&ob(ic,hc[ic])}var jc={race:Qb,Promise:Kb,allSettled:Pb,hash:Sb,hashSettled:Ub,denodeify:Nb,on:ob,off:pb,map:Xb,filter:$b,resolve:Yb,reject:Zb,all:Ob,rethrow:Vb,defer:Wb,EventTarget:qb,configure:c,async:nb};"function"==typeof define&&define.amd?define(function(){return jc}):"undefined"!=typeof module&&module.exports?module.exports=jc:"undefined"!=typeof this&&(this.RSVP=jc)}).call(this),function(a,b){"use strict";var c=b.head||b.getElementsByTagName("head")[0],d="basket-",e=5e3,f=[],g=function(a,b){try{return localStorage.setItem(d+a,JSON.stringify(b)),!0}catch(c){if(c.name.toUpperCase().indexOf("QUOTA")>=0){var e,f=[];for(e in localStorage)0===e.indexOf(d)&&f.push(JSON.parse(localStorage[e]));return f.length?(f.sort(function(a,b){return a.stamp-b.stamp}),basket.remove(f[0].key),g(a,b)):void 0}return}},h=function(a){var b=new RSVP.Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.onreadystatechange=function(){4===d.readyState&&(200===d.status||0===d.status&&d.responseText?b({content:d.responseText,type:d.getResponseHeader("content-type")}):c(new Error(d.statusText)))},setTimeout(function(){d.readyState<4&&d.abort()},basket.timeout),d.send()});return b},i=function(a){return h(a.url).then(function(b){var c=j(a,b);return a.skipCache||g(a.key,c),c})},j=function(a,b){var c=+new Date;return a.data=b.content,a.originalType=b.type,a.type=a.type||b.type,a.skipCache=a.skipCache||!1,a.stamp=c,a.expire=c+60*(a.expire||e)*60*1e3,a},k=function(a,b){return!a||a.expire-+new Date<0||b.unique!==a.unique||basket.isValidItem&&!basket.isValidItem(a,b)},l=function(a){var b,c,d;if(a.url)return a.key=a.key||a.url,b=basket.get(a.key),a.execute=a.execute!==!1,d=k(b,a),a.live||d?(a.unique&&(a.url+=(a.url.indexOf("?")>0?"&":"?")+"basket-unique="+a.unique),c=i(a),a.live&&!d&&(c=c.then(function(a){return a},function(){return b}))):(b.type=a.type||b.originalType,b.execute=a.execute,c=new RSVP.Promise(function(a){a(b)})),c},m=function(a){var d=b.createElement("script");d.defer=!0,d.text=a.data,c.appendChild(d)},n={"default":m},o=function(a){return a.type&&n[a.type]?n[a.type](a):n["default"](a)},p=function(a){return a.map(function(a){return a.execute&&o(a),a})},q=function(){var a,b,c=[];for(a=0,b=arguments.length;b>a;a++)c.push(l(arguments[a]));return RSVP.all(c)},r=function(){var a=q.apply(null,arguments),b=this.then(function(){return a}).then(p);return b.thenRequire=r,b};a.basket={require:function(){for(var a=0,b=arguments.length;b>a;a++)arguments[a].execute=arguments[a].execute!==!1,arguments[a].once&&f.indexOf(arguments[a].url)>=0?arguments[a].execute=!1:arguments[a].execute!==!1&&f.indexOf(arguments[a].url)<0&&f.push(arguments[a].url);var c=q.apply(null,arguments).then(p);return c.thenRequire=r,c},remove:function(a){return localStorage.removeItem(d+a),this},get:function(a){var b=localStorage.getItem(d+a);try{return JSON.parse(b||"false")}catch(c){return!1}},clear:function(a){var b,c,e=+new Date;for(b in localStorage)c=b.split(d)[1],c&&(!a||this.get(c).expire<=e)&&this.remove(c);return this},isValidItem:null,timeout:5e3,addHandler:function(a,b){Array.isArray(a)||(a=[a]),a.forEach(function(a){n[a]=b})},removeHandler:function(a){basket.addHandler(a,void 0)}},basket.clear(!0)}(this,document); //# sourceMappingURL=basket.full.min.js.map \ No newline at end of file diff --git a/dist/basket.full.min.js.map b/dist/basket.full.min.js.map index 7bb2f8c..cfcd0ac 100644 --- a/dist/basket.full.min.js.map +++ b/dist/basket.full.min.js.map @@ -1 +1 @@ -{"version":3,"file":"basket.full.min.js","sources":["../bower_components/rsvp/rsvp.min.js","basket.js"],"names":["M","a","b","constructor","this","c","s","q","y","C","push","name","H","r","L","detail","K","label","u","timeStamp","N","stack","Error","setTimeout","length","h","l","O","d","G","v","P","k","arguments","z","Q","aa","call","e","ba","async","f","p","m","ca","D","then","E","error","da","i","g","R","S","I","TypeError","ea","T","state","value","reason","B","A","w","t","j","fa","U","V","apply","ga","ha","ia","all","ja","process","F","ka","W","document","createTextNode","observe","characterData","data","la","MessageChannel","port1","onmessage","port2","postMessage","ma","x","X","Y","n","splice","J","Array","isArray","Object","prototype","toString","Date","now","getTime","create","o","resolve","na","race","reject","catch","Z","hasOwnProperty","position","$","window","MutationObserver","WebKitMutationObserver","Uint8ClampedArray","importScripts","__PROMISE_INSTRUMENTATION__","Promise","allSettled","hash","hashSettled","denodeify","__proto__","on","off","map","filter","rethrow","defer","EventTarget","configure","define","module","RSVP","head","getElementsByTagName","storagePrefix","defaultExpiration","addLocalStorage","key","storeObj","localStorage","setItem","JSON","stringify","toUpperCase","indexOf","item","tempScripts","parse","sort","stamp","basket","remove","getUrl","url","promise","xhr","XMLHttpRequest","open","onreadystatechange","readyState","status","content","responseText","type","getResponseHeader","statusText","abort","timeout","send","saveUrl","obj","result","wrapStoreData","skipCache","originalType","expire","isCacheValid","source","unique","isValidItem","handleStackObject","shouldFetch","get","execute","live","injectScript","script","createElement","text","appendChild","handlers","default","performActions","resources","fetch","promises","thenRequire","require","removeItem","getItem","clear","expired","split","addHandler","types","handler","forEach","removeHandler","undefined"],"mappings":";;;;;;;;;CAQA,WAAY,QAASA,GAAEC,EAAEC,GAAG,GAAGD,GAAG,gBAAkBA,IAAGA,EAAEE,cAAcC,KAAK,MAAOH,EAAE,IAAII,GAAE,GAAID,MAAKE,EAAEJ,EAAU,OAAPK,GAAEF,EAAEJ,GAAUI,EAAE,QAASG,GAAEP,EAAEC,EAAEG,GAAG,IAAII,EAAEC,MAAMC,KAAKV,EAAEW,GAAGZ,EAAEE,EAAEK,EA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AAKyL,IAAK7C,GAAMsC,QAAU/E,IACnDnG,KAAK0J,OAAQd,EAIf,OAAO5I,OAGRsL,YAAa,KAEbZ,QAAS,IAEToC,WAAY,SAAUC,EAAOC,GACvBnH,MAAMC,QAASiH,KACnBA,GAAUA,IAEXA,EAAME,QAAS,SAAU3C,GACxB2B,EAAU3B,GAAS0C,KAIrBE,cAAe,SAAUH,GACxBtD,OAAOqD,WAAYC,EAAOI,UAK5B1D,OAAOkD,OAAO,IAEX3M,KAAM2E"} \ No newline at end of file +{"version":3,"file":"basket.full.min.js","sources":["../bower_components/rsvp/rsvp.min.js","basket.js"],"names":["t","n","r","e","length","_promiseCallbacks","mn","on","arguments","o","i","u","s","setTimeout","An","payload","guid","key","id","childGuid","childId","error","stack","trigger","name","a","push","_guidKey","_id","eventName","detail","_result","label","_label","timeStamp","bn","Error","c","TypeError","f","l","then","Cn","h","call","p","async","d","m","w","_","_state","kn","Sn","_onError","g","v","constructor","y","b","Tn","_subscribers","instrument","jn","j","E","this","A","On","T","k","state","value","reason","S","_instanceConstructor","promise","_abortOnReject","_validateInput","_input","_remaining","_init","_enumerate","_validationError","C","In","O","gn","resolve","I","R","x","M","N","Yn","P","Y","Kn","D","apply","K","Array","U","q","F","V","Un","Dn","L","G","__proto__","all","W","$","_superConstructor","z","B","race","H","J","Vn","Q","X","Z","tn","reject","nn","rn","en","un","sr","tr","$n","sn","process","nextTick","versions","node","match","isArray","setImmediate","hn","an","vertxNext","cn","or","document","createTextNode","observe","characterData","data","fn","MessageChannel","port1","onmessage","port2","postMessage","ln","pn","require","runOnLoop","runOnContext","_n","vn","dn","off","yn","mixin","splice","wn","Object","prototype","toString","Date","now","getTime","En","create","_eachEntry","_settledAt","_willSettleAt","_makeResult","Rn","xn","Mn","Nn","Pn","cast","catch","finally","qn","Fn","Gn","Ln","hasOwnProperty","position","entry","Wn","zn","Bn","Hn","Jn","Qn","Xn","Zn","nr","rr","window","er","MutationObserver","WebKitMutationObserver","ir","ur","Uint8ClampedArray","importScripts","__PROMISE_INSTRUMENTATION__","ar","cr","fr","Promise","allSettled","hash","hashSettled","denodeify","map","filter","rethrow","defer","EventTarget","configure","define","amd","module","exports","RSVP","head","getElementsByTagName","storagePrefix","defaultExpiration","inBasket","addLocalStorage","storeObj","localStorage","setItem","JSON","stringify","toUpperCase","indexOf","item","tempScripts","parse","sort","stamp","basket","remove","getUrl","url","xhr","XMLHttpRequest","open","onreadystatechange","readyState","status","responseText","content","type","getResponseHeader","statusText","abort","timeout","send","saveUrl","obj","result","wrapStoreData","skipCache","originalType","expire","isCacheValid","source","unique","isValidItem","handleStackObject","shouldFetch","get","execute","live","injectScript","script","createElement","text","appendChild","handlers","default","performActions","resources","fetch","promises","thenRequire","once","removeItem","getItem","clear","expired","split","addHandler","types","handler","forEach","removeHandler","undefined"],"mappings":";;;;;;;;;CAQA,WAAY,YAAa,SAASA,GAAEA,EAAEC,GAAG,IAAI,GAAIC,GAAE,EAAEC,EAAEH,EAAEI,OAAOD,EAAED,EAAEA,IAAI,GAAGF,EAAEE,KAAKD,EAAE,MAAOC,EAAE,OAAM,GAAG,QAASD,GAAED,GAAG,GAAIC,GAAED,EAAEK,iBAAkB,OAAQJ,KAAIA,EAAED,EAAEK,sBAAuBJ,EAAG,QAASC,GAAEF,EAAEC,GAAG,MAAM,YAAYD,MAAOM,IAAGC,GAAG,QAAQN,GAAG,IAAIO,UAAUJ,OAAOE,GAAGN,QAAQM,GAAGN,GAAGC,GAAG,QAASE,GAAEH,GAAG,MAAM,kBAAmBA,IAAG,gBAAiBA,IAAG,OAAOA,EAAE,QAASS,GAAET,GAAG,MAAM,kBAAmBA,GAAE,QAASU,GAAEV,GAAG,MAAM,gBAAiBA,IAAG,OAAOA,EAAE,QAASW,MAAK,QAASC,KAAIC,WAAW,WAAW,IAAI,GAAIb,GAAEC,EAAE,EAAEA,EAAEa,GAAGV,OAAOH,IAAI,CAACD,EAAEc,GAAGb,EAAG,IAAIC,GAAEF,EAAEe,OAAQb,GAAEc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ACnBA,GAAUA,IAEXA,EAAME,QAAS,SAAU3C,GACxB2B,EAAU3B,GAAS0C,KAIrBE,cAAe,SAAUH,GACxBrD,OAAOoD,WAAYC,EAAOI,UAK5BzD,OAAOiD,OAAO,IAEX5O,KAAMgF"} \ No newline at end of file diff --git a/dist/basket.js b/dist/basket.js index c754c77..aba094d 100644 --- a/dist/basket.js +++ b/dist/basket.js @@ -1,6 +1,6 @@ /*! * basket.js -* v0.5.1 - 2014-08-16 +* v0.5.2 - 2015-02-07 * http://addyosmani.github.com/basket.js * (c) Addy Osmani; License * Created by: Addy Osmani, Sindre Sorhus, Andrée Hansson, Mat Scales @@ -12,6 +12,7 @@ var head = document.head || document.getElementsByTagName('head')[0]; var storagePrefix = 'basket-'; var defaultExpiration = 5000; + var inBasket = []; var addLocalStorage = function( key, storeObj ) { try { @@ -58,7 +59,8 @@ xhr.onreadystatechange = function() { if ( xhr.readyState === 4 ) { - if( xhr.status === 200 ) { + if ( ( xhr.status === 200 ) || + ( ( xhr.status === 0 ) && xhr.responseText ) ) { resolve( { content: xhr.responseText, type: xhr.getResponseHeader('content-type') @@ -123,7 +125,7 @@ obj.key = ( obj.key || obj.url ); source = basket.get( obj.key ); - + obj.execute = obj.execute !== false; shouldFetch = isCacheValid(source, obj); @@ -147,6 +149,7 @@ } } else { source.type = obj.type || source.originalType; + source.execute = obj.execute; promise = new RSVP.Promise( function( resolve ){ resolve( source ); }); @@ -177,7 +180,7 @@ }; var performActions = function( resources ) { - resources.map( function( obj ) { + return resources.map( function( obj ) { if( obj.execute ) { execute( obj ); } @@ -207,6 +210,16 @@ window.basket = { require: function() { + for ( var a = 0, l = arguments.length; a < l; a++ ) { + arguments[a].execute = arguments[a].execute !== false; + + if ( arguments[a].once && inBasket.indexOf(arguments[a].url) >= 0 ) { + arguments[a].execute = false; + } else if ( arguments[a].execute !== false && inBasket.indexOf(arguments[a].url) < 0 ) { + inBasket.push(arguments[a].url); + } + } + var promise = fetch.apply( null, arguments ).then( performActions ); promise.thenRequire = thenRequire; diff --git a/dist/basket.min.js b/dist/basket.min.js index 6dbc688..4cd6f41 100644 --- a/dist/basket.min.js +++ b/dist/basket.min.js @@ -1,11 +1,11 @@ /*! * basket.js -* v0.5.1 - 2014-08-16 +* v0.5.2 - 2015-02-07 * http://addyosmani.github.com/basket.js * (c) Addy Osmani; License * Created by: Addy Osmani, Sindre Sorhus, Andrée Hansson, Mat Scales * Contributors: Ironsjp, Mathias Bynens, Rick Waldron, Felipe Morais * Uses rsvp.js, https://github.com/tildeio/rsvp.js */ -!function(a,b){"use strict";var c=b.head||b.getElementsByTagName("head")[0],d="basket-",e=5e3,f=function(a,b){try{return localStorage.setItem(d+a,JSON.stringify(b)),!0}catch(c){if(c.name.toUpperCase().indexOf("QUOTA")>=0){var e,g=[];for(e in localStorage)0===e.indexOf(d)&&g.push(JSON.parse(localStorage[e]));return g.length?(g.sort(function(a,b){return a.stamp-b.stamp}),basket.remove(g[0].key),f(a,b)):void 0}return}},g=function(a){var b=new RSVP.Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.onreadystatechange=function(){4===d.readyState&&(200===d.status?b({content:d.responseText,type:d.getResponseHeader("content-type")}):c(new Error(d.statusText)))},setTimeout(function(){d.readyState<4&&d.abort()},basket.timeout),d.send()});return b},h=function(a){return g(a.url).then(function(b){var c=i(a,b);return a.skipCache||f(a.key,c),c})},i=function(a,b){var c=+new Date;return a.data=b.content,a.originalType=b.type,a.type=a.type||b.type,a.skipCache=a.skipCache||!1,a.stamp=c,a.expire=c+60*(a.expire||e)*60*1e3,a},j=function(a,b){return!a||a.expire-+new Date<0||b.unique!==a.unique||basket.isValidItem&&!basket.isValidItem(a,b)},k=function(a){var b,c,d;if(a.url)return a.key=a.key||a.url,b=basket.get(a.key),a.execute=a.execute!==!1,d=j(b,a),a.live||d?(a.unique&&(a.url+=(a.url.indexOf("?")>0?"&":"?")+"basket-unique="+a.unique),c=h(a),a.live&&!d&&(c=c.then(function(a){return a},function(){return b}))):(b.type=a.type||b.originalType,c=new RSVP.Promise(function(a){a(b)})),c},l=function(a){var d=b.createElement("script");d.defer=!0,d.text=a.data,c.appendChild(d)},m={"default":l},n=function(a){return a.type&&m[a.type]?m[a.type](a):m["default"](a)},o=function(a){a.map(function(a){return a.execute&&n(a),a})},p=function(){var a,b,c=[];for(a=0,b=arguments.length;b>a;a++)c.push(k(arguments[a]));return RSVP.all(c)},q=function(){var a=p.apply(null,arguments),b=this.then(function(){return a}).then(o);return b.thenRequire=q,b};a.basket={require:function(){var a=p.apply(null,arguments).then(o);return a.thenRequire=q,a},remove:function(a){return localStorage.removeItem(d+a),this},get:function(a){var b=localStorage.getItem(d+a);try{return JSON.parse(b||"false")}catch(c){return!1}},clear:function(a){var b,c,e=+new Date;for(b in localStorage)c=b.split(d)[1],c&&(!a||this.get(c).expire<=e)&&this.remove(c);return this},isValidItem:null,timeout:5e3,addHandler:function(a,b){Array.isArray(a)||(a=[a]),a.forEach(function(a){m[a]=b})},removeHandler:function(a){basket.addHandler(a,void 0)}},basket.clear(!0)}(this,document); +!function(a,b){"use strict";var c=b.head||b.getElementsByTagName("head")[0],d="basket-",e=5e3,f=[],g=function(a,b){try{return localStorage.setItem(d+a,JSON.stringify(b)),!0}catch(c){if(c.name.toUpperCase().indexOf("QUOTA")>=0){var e,f=[];for(e in localStorage)0===e.indexOf(d)&&f.push(JSON.parse(localStorage[e]));return f.length?(f.sort(function(a,b){return a.stamp-b.stamp}),basket.remove(f[0].key),g(a,b)):void 0}return}},h=function(a){var b=new RSVP.Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.onreadystatechange=function(){4===d.readyState&&(200===d.status||0===d.status&&d.responseText?b({content:d.responseText,type:d.getResponseHeader("content-type")}):c(new Error(d.statusText)))},setTimeout(function(){d.readyState<4&&d.abort()},basket.timeout),d.send()});return b},i=function(a){return h(a.url).then(function(b){var c=j(a,b);return a.skipCache||g(a.key,c),c})},j=function(a,b){var c=+new Date;return a.data=b.content,a.originalType=b.type,a.type=a.type||b.type,a.skipCache=a.skipCache||!1,a.stamp=c,a.expire=c+60*(a.expire||e)*60*1e3,a},k=function(a,b){return!a||a.expire-+new Date<0||b.unique!==a.unique||basket.isValidItem&&!basket.isValidItem(a,b)},l=function(a){var b,c,d;if(a.url)return a.key=a.key||a.url,b=basket.get(a.key),a.execute=a.execute!==!1,d=k(b,a),a.live||d?(a.unique&&(a.url+=(a.url.indexOf("?")>0?"&":"?")+"basket-unique="+a.unique),c=i(a),a.live&&!d&&(c=c.then(function(a){return a},function(){return b}))):(b.type=a.type||b.originalType,b.execute=a.execute,c=new RSVP.Promise(function(a){a(b)})),c},m=function(a){var d=b.createElement("script");d.defer=!0,d.text=a.data,c.appendChild(d)},n={"default":m},o=function(a){return a.type&&n[a.type]?n[a.type](a):n["default"](a)},p=function(a){return a.map(function(a){return a.execute&&o(a),a})},q=function(){var a,b,c=[];for(a=0,b=arguments.length;b>a;a++)c.push(l(arguments[a]));return RSVP.all(c)},r=function(){var a=q.apply(null,arguments),b=this.then(function(){return a}).then(p);return b.thenRequire=r,b};a.basket={require:function(){for(var a=0,b=arguments.length;b>a;a++)arguments[a].execute=arguments[a].execute!==!1,arguments[a].once&&f.indexOf(arguments[a].url)>=0?arguments[a].execute=!1:arguments[a].execute!==!1&&f.indexOf(arguments[a].url)<0&&f.push(arguments[a].url);var c=q.apply(null,arguments).then(p);return c.thenRequire=r,c},remove:function(a){return localStorage.removeItem(d+a),this},get:function(a){var b=localStorage.getItem(d+a);try{return JSON.parse(b||"false")}catch(c){return!1}},clear:function(a){var b,c,e=+new Date;for(b in localStorage)c=b.split(d)[1],c&&(!a||this.get(c).expire<=e)&&this.remove(c);return this},isValidItem:null,timeout:5e3,addHandler:function(a,b){Array.isArray(a)||(a=[a]),a.forEach(function(a){n[a]=b})},removeHandler:function(a){basket.addHandler(a,void 0)}},basket.clear(!0)}(this,document); //# sourceMappingURL=basket.min.js.map \ No newline at end of file diff --git a/dist/basket.min.js.map b/dist/basket.min.js.map index fe48f45..a185094 100644 --- a/dist/basket.min.js.map +++ b/dist/basket.min.js.map @@ -1 +1 @@ -{"version":3,"file":"basket.min.js","sources":["basket.js"],"names":["window","document","head","getElementsByTagName","storagePrefix","defaultExpiration","addLocalStorage","key","storeObj","localStorage","setItem","JSON","stringify","e","name","toUpperCase","indexOf","item","tempScripts","push","parse","length","sort","a","b","stamp","basket","remove","getUrl","url","promise","RSVP","Promise","resolve","reject","xhr","XMLHttpRequest","open","onreadystatechange","readyState","status","content","responseText","type","getResponseHeader","Error","statusText","setTimeout","abort","timeout","send","saveUrl","obj","then","result","wrapStoreData","skipCache","data","now","Date","originalType","expire","isCacheValid","source","unique","isValidItem","handleStackObject","shouldFetch","get","execute","live","injectScript","script","createElement","defer","text","appendChild","handlers","default","performActions","resources","map","fetch","i","l","promises","arguments","all","thenRequire","apply","this","require","removeItem","getItem","clear","expired","split","addHandler","types","handler","Array","isArray","forEach","removeHandler","undefined"],"mappings":";;;;;;;;;CAQE,SAAWA,EAAQC,GACpB,YAEA,IAAIC,GAAOD,EAASC,MAAQD,EAASE,qBAAqB,QAAQ,GAC9DC,EAAgB,UAChBC,EAAoB,IAEpBC,EAAkB,SAAUC,EAAKC,GACpC,IAEC,MADAC,cAAaC,QAASN,EAAgBG,EAAKI,KAAKC,UAAWJ,KACpD,EACN,MAAOK,GACR,GAAKA,EAAEC,KAAKC,cAAcC,QAAQ,UAAY,EAAI,CACjD,GAAIC,GACAC,IAEJ,KAAMD,IAAQR,cAC0B,IAAlCQ,EAAKD,QAASZ,IAClBc,EAAYC,KAAMR,KAAKS,MAAOX,aAAcQ,IAI9C,OAAKC,GAAYG,QAChBH,EAAYI,KAAK,SAAUC,EAAGC,GAC7B,MAAOD,GAAEE,MAAQD,EAAEC,QAGpBC,OAAOC,OAAQT,EAAa,GAAIX,KAEzBD,EAAiBC,EAAKC,IAI7B,OAKD,SAMCoB,EAAS,SAAUC,GACtB,GAAIC,GAAU,GAAIC,MAAKC,QAAS,SAAUC,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IU,GAAOR,aAAaoF,QAASzF,EAAgBG,EACjD,KACC,MAAOI,MAAKS,MAAOH,GAAQ,SAC1B,MAAOJ,GACR,OAAO,IAITiF,MAAO,SAAUC,GAChB,GAAI9E,GAAMV,EACNmD,GAAO,GAAIC,KAEf,KAAM1C,IAAQR,cACbF,EAAMU,EAAK+E,MAAO5F,GAAiB,GAC9BG,KAAUwF,GAAWL,KAAKtB,IAAK7D,GAAMsD,QAAUH,IACnDgC,KAAK/D,OAAQpB,EAIf,OAAOmF,OAGRzB,YAAa,KAEbhB,QAAS,IAETgD,WAAY,SAAUC,EAAOC,GACvBC,MAAMC,QAASH,KACnBA,GAAUA,IAEXA,EAAMI,QAAS,SAAU3D,GACxBkC,EAAUlC,GAASwD,KAIrBI,cAAe,SAAUL,GACxBxE,OAAOuE,WAAYC,EAAOM,UAK5B9E,OAAOoE,OAAO,IAEXJ,KAAMzF"} \ No newline at end of file +{"version":3,"file":"basket.min.js","sources":["basket.js"],"names":["window","document","head","getElementsByTagName","storagePrefix","defaultExpiration","inBasket","addLocalStorage","key","storeObj","localStorage","setItem","JSON","stringify","e","name","toUpperCase","indexOf","item","tempScripts","push","parse","length","sort","a","b","stamp","basket","remove","getUrl","url","promise","RSVP","Promise","resolve","reject","xhr","XMLHttpRequest","open","onreadystatechange","readyState","status","responseText","content","type","getResponseHeader","Error","statusText","setTimeout","abort","timeout","send","saveUrl","obj","then","result","wrapStoreData","skipCache","data","now","Date","originalType","expire","isCacheValid","source","unique","isValidItem","handleStackObject","shouldFetch","get","execute","live","injectScript","script","createElement","defer","text","appendChild","handlers","default","performActions","resources","map","fetch","i","l","promises","arguments","all","thenRequire","apply","this","require","once","removeItem","getItem","clear","expired","split","addHandler","types","handler","Array","isArray","forEach","removeHandler","undefined"],"mappings":";;;;;;;;;CAQE,SAAWA,EAAQC,GACpB,YAEA,IAAIC,GAAOD,EAASC,MAAQD,EAASE,qBAAqB,QAAQ,GAC9DC,EAAgB,UAChBC,EAAoB,IACpBC,K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OAAQpB,EAIf,OAAOmF,OAGRzB,YAAa,KAEbhB,QAAS,IAETiD,WAAY,SAAUC,EAAOC,GACvBC,MAAMC,QAASH,KACnBA,GAAUA,IAEXA,EAAMI,QAAS,SAAU5D,GACxBkC,EAAUlC,GAASyD,KAIrBI,cAAe,SAAUL,GACxBzE,OAAOwE,WAAYC,EAAOM,UAK5B/E,OAAOqE,OAAO,IAEXL,KAAM1F"} \ No newline at end of file diff --git a/package.json b/package.json index a741200..fec922f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "basket.js", - "version": "0.5.1", + "version": "0.5.2", "description": "A script-loader that handles caching scripts in localStorage where supported", "keywords": [ "script",