UNPKG

1.51 kBJavaScriptView Raw
1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,o){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).VueAxios=o()}(this,(function(){"use strict";function e(e,i){if(!e.vueAxiosInstalled){var f,r=t(i)?{axios:f=i,$http:f}:i;if("object"===_typeof(u=r)&&Object.keys(u).every((function(e){return t(u[e])}))){var u,s=function(e){return e&&e.version&&Number(e.version.split(".")[0])}(e);if(s){var c=s<3?o:n;Object.keys(r).forEach((function(o){c(e,o,r[o])})),e.vueAxiosInstalled=!0}else console.error("[vue-axios] unknown Vue version")}else console.error("[vue-axios] configuration is invalid, expected options are either <axios_instance> or { <registration_key>: <axios_instance> }")}}function o(e,o,n){Object.defineProperty(e.prototype,o,{get:function(){return n}}),e[o]=n}function n(e,o,n){e.config.globalProperties[o]=n,e[o]=n}function t(e){return e&&"function"==typeof e.get&&"function"==typeof e.post}return"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e:"function"==typeof define&&define.amd?define([],(function(){return e})):window.Vue&&window.axios&&window.Vue.use&&Vue.use(e,window.axios),e}));
\No newline at end of file