New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@liqueflies/vuex-async-module

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liqueflies/vuex-async-module - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

9

dist/index.js
'use strict';
exports.__esModule = true;
exports.asyncModuleMixin = undefined;
exports.getDefaultState = getDefaultState;

@@ -9,2 +10,10 @@ exports.getDefaultTypes = getDefaultTypes;

exports.default = getAsyncModule;
var _mixin = require('./mixin');
var _mixin2 = _interopRequireDefault(_mixin);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.asyncModuleMixin = _mixin2.default;
function getDefaultState() {

@@ -11,0 +20,0 @@ return {

2

dist/mixin.js

@@ -29,3 +29,3 @@ 'use strict';

(_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
return (_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
}, _Object$assign2));

@@ -32,0 +32,0 @@ }

@@ -0,1 +1,5 @@

import asyncModuleMixin from './mixin';
export { asyncModuleMixin };
export function getDefaultState() {

@@ -2,0 +6,0 @@ return {

@@ -18,5 +18,5 @@ import camelCase from 'lodash.camelcase';

(_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
return (_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
}, _Object$assign2));
}
};
{
"name": "@liqueflies/vuex-async-module",
"version": "0.0.4",
"version": "0.0.5",
"description": "vuex async module generator.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -0,1 +1,5 @@

import asyncModuleMixin from './mixin'
export { asyncModuleMixin }
export function getDefaultState () {

@@ -2,0 +6,0 @@ return {

@@ -24,3 +24,3 @@ import camelCase from 'lodash.camelcase'

[`getAsync${upperFirst(camelCase(name))}`]: function () {
this.$store.dispatch(`${name}/getAsync`, ...arguments)
return this.$store.dispatch(`${name}/getAsync`, ...arguments)
}

@@ -27,0 +27,0 @@ }

/*! @liqueflies/vuex-async-module - v0.0.4
/*! @liqueflies/vuex-async-module - v0.0.5
* https://github.com/liqueflies/vuex-async-module

@@ -14,86 +14,2 @@ * Copyright (c) 2017 - [object Object];

function getDefaultState() {
return {
isPending: true,
statusCode: null,
data: null,
errors: null
};
}
function getDefaultTypes() {
return {
SET_RESPONSE_DATA: 'SET_RESPONSE_DATA',
SET_IS_PENDING: 'SET_IS_PENDING',
SET_STATUS_CODE: 'SET_STATUS_CODE',
SET_ERRORS: 'SET_ERRORS'
};
}
function getDefaultMutations() {
var _ref;
var types = getDefaultTypes();
return _ref = {}, _ref[types.SET_RESPONSE_DATA] = function (state, data) {
state.data = data;
return state.data;
}, _ref[types.SET_IS_PENDING] = function (state, isPending) {
state.isPending = isPending;
return state.isPending;
}, _ref[types.SET_STATUS_CODE] = function (state, status) {
state.statusCode = status;
return state.statusCode;
}, _ref[types.SET_ERRORS] = function (state, errors) {
state.errors = errors;
return state.errors;
}, _ref;
}
function getDefaultActions(xhr) {
var _getDefaultTypes = getDefaultTypes(),
SET_RESPONSE_DATA = _getDefaultTypes.SET_RESPONSE_DATA,
SET_IS_PENDING = _getDefaultTypes.SET_IS_PENDING,
SET_STATUS_CODE = _getDefaultTypes.SET_STATUS_CODE,
SET_ERRORS = _getDefaultTypes.SET_ERRORS;
return {
getAsync: function getAsync(_ref2, _ref3) {
var state = _ref2.state,
commit = _ref2.commit;
var url = _ref3.url,
_ref3$forceUpdate = _ref3.forceUpdate,
forceUpdate = _ref3$forceUpdate === undefined ? false : _ref3$forceUpdate;
if (state.isPending || forceUpdate) {
return xhr(url).then(function (response) {
commit(SET_RESPONSE_DATA, response.data);
commit(SET_STATUS_CODE, response.status);
commit(SET_IS_PENDING, false);
}).catch(function (response) {
commit(SET_ERRORS, response.errors);
commit(SET_STATUS_CODE, response.status);
commit(SET_IS_PENDING, false);
});
} else {
return Promise.resolve(null);
}
}
};
}
function getAsyncModule$1() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var opts = Object.assign({}, options); // for extensibility
if (opts.xhr === undefined) {
throw new TypeError('You must provide a valid XHR transport library in `options.xhr`');
}
return {
namespaced: true,
state: getDefaultState(),
mutations: getDefaultMutations(),
actions: getDefaultActions(opts.xhr)
};
}
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

@@ -1019,3 +935,3 @@

(_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
return (_$store = this.$store).dispatch.apply(_$store, [name + '/getAsync'].concat(Array.prototype.slice.call(arguments)));
}, _Object$assign2));

@@ -1025,2 +941,86 @@ }

function getDefaultState() {
return {
isPending: true,
statusCode: null,
data: null,
errors: null
};
}
function getDefaultTypes() {
return {
SET_RESPONSE_DATA: 'SET_RESPONSE_DATA',
SET_IS_PENDING: 'SET_IS_PENDING',
SET_STATUS_CODE: 'SET_STATUS_CODE',
SET_ERRORS: 'SET_ERRORS'
};
}
function getDefaultMutations() {
var _ref;
var types = getDefaultTypes();
return _ref = {}, _ref[types.SET_RESPONSE_DATA] = function (state, data) {
state.data = data;
return state.data;
}, _ref[types.SET_IS_PENDING] = function (state, isPending) {
state.isPending = isPending;
return state.isPending;
}, _ref[types.SET_STATUS_CODE] = function (state, status) {
state.statusCode = status;
return state.statusCode;
}, _ref[types.SET_ERRORS] = function (state, errors) {
state.errors = errors;
return state.errors;
}, _ref;
}
function getDefaultActions(xhr) {
var _getDefaultTypes = getDefaultTypes(),
SET_RESPONSE_DATA = _getDefaultTypes.SET_RESPONSE_DATA,
SET_IS_PENDING = _getDefaultTypes.SET_IS_PENDING,
SET_STATUS_CODE = _getDefaultTypes.SET_STATUS_CODE,
SET_ERRORS = _getDefaultTypes.SET_ERRORS;
return {
getAsync: function getAsync(_ref2, _ref3) {
var state = _ref2.state,
commit = _ref2.commit;
var url = _ref3.url,
_ref3$forceUpdate = _ref3.forceUpdate,
forceUpdate = _ref3$forceUpdate === undefined ? false : _ref3$forceUpdate;
if (state.isPending || forceUpdate) {
return xhr(url).then(function (response) {
commit(SET_RESPONSE_DATA, response.data);
commit(SET_STATUS_CODE, response.status);
commit(SET_IS_PENDING, false);
}).catch(function (response) {
commit(SET_ERRORS, response.errors);
commit(SET_STATUS_CODE, response.status);
commit(SET_IS_PENDING, false);
});
} else {
return Promise.resolve(null);
}
}
};
}
function getAsyncModule$1() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var opts = Object.assign({}, options); // for extensibility
if (opts.xhr === undefined) {
throw new TypeError('You must provide a valid XHR transport library in `options.xhr`');
}
return {
namespaced: true,
state: getDefaultState(),
mutations: getDefaultMutations(),
actions: getDefaultActions(opts.xhr)
};
}
exports.asyncModuleMixin = mixin;

@@ -1027,0 +1027,0 @@ exports['default'] = getAsyncModule$1;

@@ -1,2 +0,2 @@

/*! @liqueflies/vuex-async-module - v0.0.4
/*! @liqueflies/vuex-async-module - v0.0.5
* https://github.com/liqueflies/vuex-async-module

@@ -6,3 +6,3 @@ * Copyright (c) 2017 - [object Object];

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.VuexAsyncModule={})}(this,function(t){"use strict";function e(t){return Z.test(t)}function u(t){return e(t)?function(t){return t.match(z)||[]}(t):function(t){return t.split("")}(t)}function n(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&V.call(t)==l}(t))return J?J.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}function f(t,e,u){var n=t.length;return u=void 0===u?n:u,!e&&u>=n?t:function(t,e,u){var n=-1,f=t.length;e<0&&(e=-e>f?0:f+e),(u=u>f?f:u)<0&&(u+=f),f=e>u?0:u-e>>>0,e>>>=0;for(var r=Array(f);++n<f;)r[n]=t[n+e];return r}(t,e,u)}function r(t){return null==t?"":n(t)}function o(t){return dt.test(t)}function i(t){return o(t)?function(t){return t.match(ct)||[]}(t):function(t){return t.split("")}(t)}function c(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Et.call(t)==B}(t))return xt?xt.call(t):"";var e=t+"";return"0"==e&&1/t==-X?"-0":e}function d(t,e,u){var n=t.length;return u=void 0===u?n:u,!e&&u>=n?t:function(t,e,u){var n=-1,f=t.length;e<0&&(e=-e>f?0:f+e),(u=u>f?f:u)<0&&(u+=f),f=e>u?0:u-e>>>0,e>>>=0;for(var r=Array(f);++n<f;)r[n]=t[n+e];return r}(t,e,u)}var s="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=1/0,l="[object Symbol]",E=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,S=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,p="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",x="[\\ud800-\\udfff]",T="["+p+"]",b="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g="\\d+",A="[\\u2700-\\u27bf]",_="[a-z\\xdf-\\xf6\\xf8-\\xff]",y="[^\\ud800-\\udfff"+p+g+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",O="\\ud83c[\\udffb-\\udfff]",v="[^\\ud800-\\udfff]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",j="[A-Z\\xc0-\\xd6\\xd8-\\xde]",m="(?:"+_+"|"+y+")",D="(?:"+j+"|"+y+")",I="(?:"+b+"|"+O+")"+"?",N="[\\ufe0e\\ufe0f]?"+I+("(?:\\u200d(?:"+[v,R,h].join("|")+")[\\ufe0e\\ufe0f]?"+I+")*"),P="(?:"+[A,R,h].join("|")+")"+N,C="(?:"+[v+b+"?",b,R,h,x].join("|")+")",U=RegExp("['’]","g"),L=RegExp(b,"g"),z=RegExp(O+"(?="+O+")|"+C+N,"g"),G=RegExp([j+"?"+_+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[T,j,"$"].join("|")+")",D+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[T,j+m,"$"].join("|")+")",j+"?"+m+"+(?:['’](?:d|ll|m|re|s|t|ve))?",j+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",g,P].join("|"),"g"),Z=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),$=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,w="object"==typeof s&&s&&s.Object===Object&&s,M="object"==typeof self&&self&&self.Object===Object&&self,Y=w||M||Function("return this")(),H=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"}),V=Object.prototype.toString,k=Y.Symbol,F=k?k.prototype:void 0,J=F?F.toString:void 0,q=function(t){return function(e){return function(t,e,u,n){var f=-1,r=t?t.length:0;for(n&&r&&(u=t[++f]);++f<r;)u=e(u,t[f],f,t);return u}(function(t,e,u){return t=r(t),void 0===(e=u?void 0:e)?function(t){return $.test(t)}(t)?function(t){return t.match(G)||[]}(t):function(t){return t.match(E)||[]}(t):t.match(e)||[]}(function(t){return(t=r(t))&&t.replace(S,H).replace(L,"")}(e).replace(U,"")),t,"")}}(function(t,e,u){return e=e.toLowerCase(),t+(u?function(t){return K(r(t).toLowerCase())}(e):e)}),K=function(t){return function(n){var o=e(n=r(n))?u(n):void 0,i=o?o[0]:n.charAt(0),c=o?f(o,1).join(""):n.slice(1);return i[t]()+c}}("toUpperCase"),W=q,X=1/0,B="[object Symbol]",Q="[\\ud800-\\udfff]",tt="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",et="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",nt="(?:\\ud83c[\\udde6-\\uddff]){2}",ft="[\\ud800-\\udbff][\\udc00-\\udfff]",rt="(?:"+tt+"|"+et+")"+"?",ot="[\\ufe0e\\ufe0f]?"+rt+("(?:\\u200d(?:"+[ut,nt,ft].join("|")+")[\\ufe0e\\ufe0f]?"+rt+")*"),it="(?:"+[ut+tt+"?",tt,nt,ft,Q].join("|")+")",ct=RegExp(et+"(?="+et+")|"+it+ot,"g"),dt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),st="object"==typeof s&&s&&s.Object===Object&&s,at="object"==typeof self&&self&&self.Object===Object&&self,lt=st||at||Function("return this")(),Et=Object.prototype.toString,St=lt.Symbol,pt=St?St.prototype:void 0,xt=pt?pt.toString:void 0,Tt=function(t){return function(e){var u=o(e=null==e?"":c(e))?i(e):void 0,n=u?u[0]:e.charAt(0),f=u?d(u,1).join(""):e.slice(1);return n[t]()+f}}("toUpperCase"),bt={beforeCreate:function(){var t,e,u=this.$options.name;this.$options.computed=Object.assign({},this.$options.computed,(t={},t[u]=function(){return this.$store.state[u].data},t[u+"RequestIsPending"]=function(){return this.$store.state[u].isPending},t)),this.$options.methods=Object.assign({},this.$options.methods,(e={},e["getAsync"+Tt(W(u))]=function(){var t;(t=this.$store).dispatch.apply(t,[u+"/getAsync"].concat(Array.prototype.slice.call(arguments)))},e))}};t.asyncModuleMixin=bt,t.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},t);if(void 0===e.xhr)throw new TypeError("You must provide a valid XHR transport library in `options.xhr`");return{namespaced:!0,state:{isPending:!0,statusCode:null,data:null,errors:null},mutations:function(){var t,e={SET_RESPONSE_DATA:"SET_RESPONSE_DATA",SET_IS_PENDING:"SET_IS_PENDING",SET_STATUS_CODE:"SET_STATUS_CODE",SET_ERRORS:"SET_ERRORS"};return t={},t[e.SET_RESPONSE_DATA]=function(t,e){return t.data=e,t.data},t[e.SET_IS_PENDING]=function(t,e){return t.isPending=e,t.isPending},t[e.SET_STATUS_CODE]=function(t,e){return t.statusCode=e,t.statusCode},t[e.SET_ERRORS]=function(t,e){return t.errors=e,t.errors},t}(),actions:function(t){var e={SET_RESPONSE_DATA:"SET_RESPONSE_DATA",SET_IS_PENDING:"SET_IS_PENDING",SET_STATUS_CODE:"SET_STATUS_CODE",SET_ERRORS:"SET_ERRORS"},u=e.SET_RESPONSE_DATA,n=e.SET_IS_PENDING,f=e.SET_STATUS_CODE,r=e.SET_ERRORS;return{getAsync:function(e,o){var i=e.state,c=e.commit,d=o.url,s=o.forceUpdate,a=void 0!==s&&s;return i.isPending||a?t(d).then(function(t){c(u,t.data),c(f,t.status),c(n,!1)}).catch(function(t){c(r,t.errors),c(f,t.status),c(n,!1)}):Promise.resolve(null)}}}(e.xhr)}},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.VuexAsyncModule={})}(this,function(t){"use strict";function e(t){return Z.test(t)}function u(t){return e(t)?function(t){return t.match(z)||[]}(t):function(t){return t.split("")}(t)}function n(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&V.call(t)==l}(t))return J?J.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}function f(t,e,u){var n=t.length;return u=void 0===u?n:u,!e&&u>=n?t:function(t,e,u){var n=-1,f=t.length;e<0&&(e=-e>f?0:f+e),(u=u>f?f:u)<0&&(u+=f),f=e>u?0:u-e>>>0,e>>>=0;for(var r=Array(f);++n<f;)r[n]=t[n+e];return r}(t,e,u)}function r(t){return null==t?"":n(t)}function o(t){return dt.test(t)}function i(t){return o(t)?function(t){return t.match(ct)||[]}(t):function(t){return t.split("")}(t)}function c(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Et.call(t)==B}(t))return xt?xt.call(t):"";var e=t+"";return"0"==e&&1/t==-X?"-0":e}function d(t,e,u){var n=t.length;return u=void 0===u?n:u,!e&&u>=n?t:function(t,e,u){var n=-1,f=t.length;e<0&&(e=-e>f?0:f+e),(u=u>f?f:u)<0&&(u+=f),f=e>u?0:u-e>>>0,e>>>=0;for(var r=Array(f);++n<f;)r[n]=t[n+e];return r}(t,e,u)}var s="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=1/0,l="[object Symbol]",E=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,S=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,p="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",x="[\\ud800-\\udfff]",T="["+p+"]",b="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",g="\\d+",A="[\\u2700-\\u27bf]",_="[a-z\\xdf-\\xf6\\xf8-\\xff]",y="[^\\ud800-\\udfff"+p+g+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",O="\\ud83c[\\udffb-\\udfff]",v="[^\\ud800-\\udfff]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",j="[A-Z\\xc0-\\xd6\\xd8-\\xde]",m="(?:"+_+"|"+y+")",D="(?:"+j+"|"+y+")",I="(?:"+b+"|"+O+")"+"?",N="[\\ufe0e\\ufe0f]?"+I+("(?:\\u200d(?:"+[v,R,h].join("|")+")[\\ufe0e\\ufe0f]?"+I+")*"),P="(?:"+[A,R,h].join("|")+")"+N,C="(?:"+[v+b+"?",b,R,h,x].join("|")+")",U=RegExp("['’]","g"),L=RegExp(b,"g"),z=RegExp(O+"(?="+O+")|"+C+N,"g"),G=RegExp([j+"?"+_+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[T,j,"$"].join("|")+")",D+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[T,j+m,"$"].join("|")+")",j+"?"+m+"+(?:['’](?:d|ll|m|re|s|t|ve))?",j+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",g,P].join("|"),"g"),Z=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),$=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,w="object"==typeof s&&s&&s.Object===Object&&s,M="object"==typeof self&&self&&self.Object===Object&&self,Y=w||M||Function("return this")(),H=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"}),V=Object.prototype.toString,k=Y.Symbol,F=k?k.prototype:void 0,J=F?F.toString:void 0,q=function(t){return function(e){return function(t,e,u,n){var f=-1,r=t?t.length:0;for(n&&r&&(u=t[++f]);++f<r;)u=e(u,t[f],f,t);return u}(function(t,e,u){return t=r(t),void 0===(e=u?void 0:e)?function(t){return $.test(t)}(t)?function(t){return t.match(G)||[]}(t):function(t){return t.match(E)||[]}(t):t.match(e)||[]}(function(t){return(t=r(t))&&t.replace(S,H).replace(L,"")}(e).replace(U,"")),t,"")}}(function(t,e,u){return e=e.toLowerCase(),t+(u?function(t){return K(r(t).toLowerCase())}(e):e)}),K=function(t){return function(n){var o=e(n=r(n))?u(n):void 0,i=o?o[0]:n.charAt(0),c=o?f(o,1).join(""):n.slice(1);return i[t]()+c}}("toUpperCase"),W=q,X=1/0,B="[object Symbol]",Q="[\\ud800-\\udfff]",tt="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",et="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",nt="(?:\\ud83c[\\udde6-\\uddff]){2}",ft="[\\ud800-\\udbff][\\udc00-\\udfff]",rt="(?:"+tt+"|"+et+")"+"?",ot="[\\ufe0e\\ufe0f]?"+rt+("(?:\\u200d(?:"+[ut,nt,ft].join("|")+")[\\ufe0e\\ufe0f]?"+rt+")*"),it="(?:"+[ut+tt+"?",tt,nt,ft,Q].join("|")+")",ct=RegExp(et+"(?="+et+")|"+it+ot,"g"),dt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),st="object"==typeof s&&s&&s.Object===Object&&s,at="object"==typeof self&&self&&self.Object===Object&&self,lt=st||at||Function("return this")(),Et=Object.prototype.toString,St=lt.Symbol,pt=St?St.prototype:void 0,xt=pt?pt.toString:void 0,Tt=function(t){return function(e){var u=o(e=null==e?"":c(e))?i(e):void 0,n=u?u[0]:e.charAt(0),f=u?d(u,1).join(""):e.slice(1);return n[t]()+f}}("toUpperCase"),bt={beforeCreate:function(){var t,e,u=this.$options.name;this.$options.computed=Object.assign({},this.$options.computed,(t={},t[u]=function(){return this.$store.state[u].data},t[u+"RequestIsPending"]=function(){return this.$store.state[u].isPending},t)),this.$options.methods=Object.assign({},this.$options.methods,(e={},e["getAsync"+Tt(W(u))]=function(){var t;return(t=this.$store).dispatch.apply(t,[u+"/getAsync"].concat(Array.prototype.slice.call(arguments)))},e))}};t.asyncModuleMixin=bt,t.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object.assign({},t);if(void 0===e.xhr)throw new TypeError("You must provide a valid XHR transport library in `options.xhr`");return{namespaced:!0,state:{isPending:!0,statusCode:null,data:null,errors:null},mutations:function(){var t,e={SET_RESPONSE_DATA:"SET_RESPONSE_DATA",SET_IS_PENDING:"SET_IS_PENDING",SET_STATUS_CODE:"SET_STATUS_CODE",SET_ERRORS:"SET_ERRORS"};return t={},t[e.SET_RESPONSE_DATA]=function(t,e){return t.data=e,t.data},t[e.SET_IS_PENDING]=function(t,e){return t.isPending=e,t.isPending},t[e.SET_STATUS_CODE]=function(t,e){return t.statusCode=e,t.statusCode},t[e.SET_ERRORS]=function(t,e){return t.errors=e,t.errors},t}(),actions:function(t){var e={SET_RESPONSE_DATA:"SET_RESPONSE_DATA",SET_IS_PENDING:"SET_IS_PENDING",SET_STATUS_CODE:"SET_STATUS_CODE",SET_ERRORS:"SET_ERRORS"},u=e.SET_RESPONSE_DATA,n=e.SET_IS_PENDING,f=e.SET_STATUS_CODE,r=e.SET_ERRORS;return{getAsync:function(e,o){var i=e.state,c=e.commit,d=o.url,s=o.forceUpdate,a=void 0!==s&&s;return i.isPending||a?t(d).then(function(t){c(u,t.data),c(f,t.status),c(n,!1)}).catch(function(t){c(r,t.errors),c(f,t.status),c(n,!1)}):Promise.resolve(null)}}}(e.xhr)}},Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=vuex-async-module.min.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc