UNPKG

@curi/addon-prefetch

Version:

An addon to enable prefetching curi routes

3 lines (2 loc) 638 B
var CuriAddonPrefetch=function(){"use strict";return function(){var e={};return{name:"prefetch",register:function(t){var n=t.name,r=t.match;void 0!==e[n]&&console.warn('A load function with the name "'+n+'" already exists. Each route shouldhave a unique name. By registering a function with a name that already exists, you are overwriting the existing one. This may break your application.'),r&&r.every&&(e[n]=r.every)},get:function(t,n){return null==e[t]?Promise.reject("Could not prefetch data for "+t+" because it is not registered."):e[t].call(null,n)},reset:function(){e={}}}}}(); //# sourceMappingURL=curi-addon-prefetch.min.js.map