-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwagon.min.js
1 lines (1 loc) · 873 Bytes
/
wagon.min.js
1
var Wagon=function(j){function buildErr(t){return new Error(t).toString()}function toArray(t){return Array.prototype.slice.call(t)}var settedModules=new Object,setModule=function(t,r){settedModules[t]=r},exports=function(t){var r=toArray(arguments);try{if(1==r.length){if(j.isPlainObject(t)||j.isFunction(t))return t;throw buildErr("export() argument must be function or object")}throw buildErr("export() argument must me single")}catch(e){throw buildErr(e)}},require=function(path_p){function getScript(){j.ajax(hold_path,{async:!1,cache:!1,dataType:"text",success:function(t){hold_data=t},error:function(t,r,e){if("Not Found"==e){if(hold_path=settedModules[path_p],!hold_path)throw buildErr("Path could not be found");getScript()}}})}var hold_data,hold_path=path_p;return getScript(),eval(hold_data)};return{require:require,exports:exports,setModule:setModule}}(jQuery);