vue-functions
Advanced tools
Comparing version 2.0.3 to 2.0.4
/*! | ||
* vue-functions v2.0.3 | ||
* vue-functions v2.0.4 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -337,3 +337,17 @@ * Released under the MIT License. | ||
}; | ||
var mountedMixin = { | ||
data() { | ||
return { | ||
mounted: new Promise((resolve, reject) => { | ||
this._mounted_resolve = resolve; | ||
}) | ||
}; | ||
}, | ||
mounted() { | ||
this._mounted_resolve(); | ||
} | ||
}; | ||
exports.doWatch = doWatch; | ||
@@ -343,2 +357,3 @@ exports.hookHelper = hookHelper; | ||
exports.iterateObjectWithoutDollarDash = iterateObjectWithoutDollarDash; | ||
exports.mountedMixin = mountedMixin; | ||
exports.registerPreventURLChange = registerPreventURLChange; | ||
@@ -345,0 +360,0 @@ exports.updatablePropsEvenUnbound = updatablePropsEvenUnbound; |
/*! | ||
* vue-functions v2.0.3 | ||
* vue-functions v2.0.4 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -333,3 +333,17 @@ * Released under the MIT License. | ||
}; | ||
var mountedMixin = { | ||
data() { | ||
return { | ||
mounted: new Promise((resolve, reject) => { | ||
this._mounted_resolve = resolve; | ||
}) | ||
}; | ||
}, | ||
export { doWatch, hookHelper, isPropTrue, iterateObjectWithoutDollarDash, registerPreventURLChange, updatablePropsEvenUnbound, watchAsync, windowSize }; | ||
mounted() { | ||
this._mounted_resolve(); | ||
} | ||
}; | ||
export { doWatch, hookHelper, isPropTrue, iterateObjectWithoutDollarDash, mountedMixin, registerPreventURLChange, updatablePropsEvenUnbound, watchAsync, windowSize }; |
/*! | ||
* vue-functions v2.0.3 | ||
* vue-functions v2.0.4 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -778,2 +778,4 @@ * Released under the MIT License. | ||
function _typeof(obj) { | ||
"@babel/helpers - typeof"; | ||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { | ||
@@ -854,5 +856,7 @@ module.exports = _typeof = function _typeof(obj) { | ||
var regenerator$1 = runtime_1; | ||
var _marked = | ||
/*#__PURE__*/ | ||
regenerator.mark(iterateAll); | ||
regenerator$1.mark(iterateAll); | ||
@@ -889,3 +893,3 @@ function isObject(v) { | ||
info, | ||
_i8, | ||
_i10, | ||
_Object$keys2, | ||
@@ -897,3 +901,3 @@ key, | ||
keys, | ||
_i9, | ||
_i11, | ||
_keys2, | ||
@@ -904,3 +908,3 @@ _key2, | ||
return regenerator.wrap(function iterateAll$(_context) { | ||
return regenerator$1.wrap(function iterateAll$(_context) { | ||
while (1) { | ||
@@ -957,6 +961,6 @@ switch (_context.prev = _context.next) { | ||
_i8 = 0, _Object$keys2 = Object.keys(val); | ||
_i10 = 0, _Object$keys2 = Object.keys(val); | ||
case 16: | ||
if (!(_i8 < _Object$keys2.length)) { | ||
if (!(_i10 < _Object$keys2.length)) { | ||
_context.next = 25; | ||
@@ -966,3 +970,3 @@ break; | ||
key = _Object$keys2[_i8]; | ||
key = _Object$keys2[_i10]; | ||
_info = { | ||
@@ -982,3 +986,3 @@ value: val[key], | ||
case 22: | ||
_i8++; | ||
_i10++; | ||
_context.next = 16; | ||
@@ -1042,6 +1046,6 @@ break; | ||
keys.reverse(); | ||
_i9 = 0, _keys2 = keys; | ||
_i11 = 0, _keys2 = keys; | ||
case 46: | ||
if (!(_i9 < _keys2.length)) { | ||
if (!(_i11 < _keys2.length)) { | ||
_context.next = 55; | ||
@@ -1051,3 +1055,3 @@ break; | ||
_key2 = _keys2[_i9]; | ||
_key2 = _keys2[_i11]; | ||
_info3 = { | ||
@@ -1067,3 +1071,3 @@ value: val[_key2], | ||
case 52: | ||
_i9++; | ||
_i11++; | ||
_context.next = 46; | ||
@@ -1516,3 +1520,17 @@ break; | ||
}; | ||
var mountedMixin = { | ||
data: function data() { | ||
var _this3 = this; | ||
return { | ||
mounted: new Promise(function (resolve, reject) { | ||
_this3._mounted_resolve = resolve; | ||
}) | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
this._mounted_resolve(); | ||
} | ||
}; | ||
exports.doWatch = doWatch; | ||
@@ -1522,2 +1540,3 @@ exports.hookHelper = hookHelper; | ||
exports.iterateObjectWithoutDollarDash = iterateObjectWithoutDollarDash; | ||
exports.mountedMixin = mountedMixin; | ||
exports.registerPreventURLChange = registerPreventURLChange; | ||
@@ -1524,0 +1543,0 @@ exports.updatablePropsEvenUnbound = updatablePropsEvenUnbound; |
/*! | ||
* vue-functions v2.0.3 | ||
* vue-functions v2.0.4 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Released under the MIT License. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).vueFunctions={})}(this,(function(t){"use strict";var e=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}};var r=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var n=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var o=function(t){return e(t)||r(t)||n()};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=i((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=m(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=u(t,e,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var s={};function f(){}function l(){}function h(){}var p={};p[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var y=h.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var c=u(t[n],t,o);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function m(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,m(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=h,h.constructor=l,h[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(w.prototype),w.prototype[i]=function(){return this},t.AsyncIterator=w,t.async=function(e,r,n,o){var i=new w(c(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),c=(i((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}t.exports=e})),i((function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(r)}t.exports=e})));var u=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t},s=(i((function(t){function e(r,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,r){var n=u(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}},e(r,n,o||r)}t.exports=e})),i((function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(r,n)}t.exports=e})),a.mark(h));function f(t){return"[object Object]"===Object.prototype.toString.call(t)}function l(t){return"function"==typeof t}function h(t){var e,r,n,o,i,c,u,l,h,p,d,v,y,g,w=arguments;return a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if((e=w.length>1&&void 0!==w[1]?w[1]:{}).reverse){a.next=30;break}if(null==t.length){a.next=14;break}r=0;case 4:if(!(r<t.length)){a.next=12;break}if(n={value:t[r],index:r},e.exclude&&e.exclude(n)){a.next=9;break}return a.next=9,n;case 9:r++,a.next=4;break;case 12:a.next=28;break;case 14:if(!f(t)){a.next=27;break}o=0,i=Object.keys(t);case 16:if(!(o<i.length)){a.next=25;break}if(c=i[o],u={value:t[c],key:c},e.exclude&&e.exclude(u)){a.next=22;break}return a.next=22,u;case 22:o++,a.next=16;break;case 25:a.next=28;break;case 27:throw"Unsupported type";case 28:a.next=58;break;case 30:if(null==t.length){a.next=42;break}l=t.length-1;case 32:if(!(l>=0)){a.next=40;break}if(h={value:t[l],index:l},e.exclude&&e.exclude(h)){a.next=37;break}return a.next=37,h;case 37:l--,a.next=32;break;case 40:a.next=58;break;case 42:if(!f(t)){a.next=57;break}(p=Object.keys(t)).reverse(),d=0,v=p;case 46:if(!(d<v.length)){a.next=55;break}if(y=v[d],g={value:t[y],key:y},e.exclude&&e.exclude(g)){a.next=52;break}return a.next=52,g;case 52:d++,a.next=46;break;case 55:a.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return a.stop()}}),s)}var p=a.mark(d);function d(t){var e,r;return a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=a.keys(t);case 1:if((n.t1=n.t0()).done){n.next=9;break}if(e=n.t1.value,"$"===(r=e.substr(0,1))||"_"===r){n.next=7;break}return n.next=7,{key:e,value:t[e]};case 7:n.next=1;break;case 9:case"end":return n.stop()}}),p)}var v={data:function(){return{windowSize:{innerWidth:window.innerWidth,innerHeight:window.innerHeight,outerWidth:window.outerWidth,outerHeight:window.outerHeight}}},methods:{updateWindowSize:function(){Object.assign(this.windowSize,{innerWidth:window.innerWidth,innerHeight:window.innerHeight,outerWidth:window.outerWidth,outerHeight:window.outerHeight})}},created:function(){var t=this;this._windowSize_onresize=function(){t.updateWindowSize(),t.$emit("window-resize")},function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];t.addEventListener?t.addEventListener.apply(t,[e,r].concat(o)):t.attachEvent&&t.attachEvent.apply(t,["on".concat(e),r].concat(o))}(window,"resize",this._windowSize_onresize)},beforeDestroy:function(){!function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];t.removeEventListener?t.removeEventListener.apply(t,[e,r].concat(o)):t.detachEvent&&t.detachEvent.apply(t,["on".concat(e),r].concat(o))}(window,"resize",this._windowSize_onresize)}};var y={methods:{_getNonPropHooksByName:function(t){if(this._hooks)return this._hooks[t]},addHook:function(t,e){this._getNonPropHooksByName(t)||(this._hooks||(this._hooks={}),this._hooks[t]||(this._hooks[t]=[])),this._hooks[t].push(e)},removeHook:function(t,e){var r=this._getNonPropHooksByName(t);r&&function(t,e){for(var r,n=0;(r=t.indexOf(e))>-1;)t.splice(r,1),n++}(r,e)},hasHook:function(t){return this._getNonPropHooksByName(t)||this[t]},executeHook:function(t,e){var r=this,n=this._getNonPropHooksByName(t);return n=n?n.slice():[],this[t]&&l(this[t])&&n.push((function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r[t].apply(r,o)})),function(t){var e=function(){},r=!0,n=!1,o=void 0;try{for(var i,a=h(t,{reverse:!0})[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){e=c(i.value.value,e)}}catch(t){n=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw o}}return e;function c(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.apply(void 0,[e].concat(n))}}}(n).apply(void 0,o(e))}}};t.doWatch=function(t,e){var r,n;return function o(){var i=e.call(t,r);n=t.$watch(i,(function(t){n(),r=t,o()}))}(),function(){return n&&n()}},t.hookHelper=y,t.isPropTrue=function(t){return""===t||t},t.iterateObjectWithoutDollarDash=d,t.registerPreventURLChange=function(t,e,r){var n=!1,o="It looks like you have been editing something.\nIf you leave before saving, your changes will be lost.";e.beforeEach((function(e,i,a){n?window.confirm(r||o)?(t.allowURLChange(),a()):a(!1):a()}));var i=function(t){var e=r||o;return t.returnValue=e,e};t.preventURLChange=t.prototype.$preventURLChange=function(t){null!=t&&(r=t),n||(n=!0,window.addEventListener("beforeunload",i))},t.allowURLChange=t.prototype.$allowURLChange=function(){n=!1,window.removeEventListener("beforeunload",i)}},t.updatablePropsEvenUnbound=function(t){t=l(t)?t():Object.assign({},t);var e={},r=function(r){var n=t[r];n.$localName||(n.$localName="localProps_".concat(r)),n.$localSetter||(n.$localSetter=function(t){return t});var o={};e[r]=o,Object.keys(t[r]).forEach((function(t){"$"!==t[0]&&(o[t]=n[t])}))};for(var n in t)r(n);for(var o={props:e,computed:{},watch:{},data:function(){for(var e={localValueOfUpdatableProps:{}},r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e.localValueOfUpdatableProps[o]=this[o]}return e}},i=function(){var e=c[a],r=t[e];o.watch[e]=function(t){this.localValueOfUpdatableProps[e]=r.$localSetter(t,this)};var n=r.$localName;o.computed[n]={get:function(){return this.localValueOfUpdatableProps[e]},set:function(t){"value"===e?this.$emit("input",t):this.$emit("update:".concat(e),t),this.localValueOfUpdatableProps[e]=r.$localSetter(t,this)}}},a=0,c=Object.keys(t);a<c.length;a++)i();return o},t.watchAsync=function(t,e,r,n){var o=[],i=-1;return u(),a;function a(){o.forEach((function(t){return t()})),o=[]}function c(e,r){var n,i=!0,a=t.$watch((function(){return e.call(t,c)}),(function(t){n=t,i?i=!1:u()}),{immediate:!0,deep:r&&r.deep});return o.push(a),n}function u(){a();var o=e.call(t,c),u=++i;void 0;var s,f=function(e){u===i&&(0===u?n&&n.immediate&&r.call(t,e,void 0):r.call(t,e,void 0))};s=o,"[object Promise]"===Object.prototype.toString.call(s)?o.then(f):f(o)}},t.windowSize=v,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=t||self).vueFunctions={})}(this,(function(t){"use strict";var e=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}};var r=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var n=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var o=function(t){return e(t)||r(t)||n()};function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=i((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=m(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=u(t,e,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var s={};function f(){}function l(){}function h(){}var p={};p[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var y=h.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,o){function i(){return new Promise((function(e,i){!function e(n,o,i,a){var c=u(t[n],t,o);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function m(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,m(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=h,h.constructor=l,h[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(w.prototype),w.prototype[i]=function(){return this},t.AsyncIterator=w,t.async=function(e,r,n,o){var i=new w(c(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),c=a,u=(i((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}t.exports=e})),i((function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(r)}t.exports=e})));var s=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t},f=(i((function(t){function e(r,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,r){var n=s(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}},e(r,n,o||r)}t.exports=e})),i((function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(r,n)}t.exports=e})),a),l=f.mark(d);function h(t){return"[object Object]"===Object.prototype.toString.call(t)}function p(t){return"function"==typeof t}function d(t){var e,r,n,o,i,a,c,u,s,p,d,v,y,g,w=arguments;return f.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if((e=w.length>1&&void 0!==w[1]?w[1]:{}).reverse){f.next=30;break}if(null==t.length){f.next=14;break}r=0;case 4:if(!(r<t.length)){f.next=12;break}if(n={value:t[r],index:r},e.exclude&&e.exclude(n)){f.next=9;break}return f.next=9,n;case 9:r++,f.next=4;break;case 12:f.next=28;break;case 14:if(!h(t)){f.next=27;break}o=0,i=Object.keys(t);case 16:if(!(o<i.length)){f.next=25;break}if(a=i[o],c={value:t[a],key:a},e.exclude&&e.exclude(c)){f.next=22;break}return f.next=22,c;case 22:o++,f.next=16;break;case 25:f.next=28;break;case 27:throw"Unsupported type";case 28:f.next=58;break;case 30:if(null==t.length){f.next=42;break}u=t.length-1;case 32:if(!(u>=0)){f.next=40;break}if(s={value:t[u],index:u},e.exclude&&e.exclude(s)){f.next=37;break}return f.next=37,s;case 37:u--,f.next=32;break;case 40:f.next=58;break;case 42:if(!h(t)){f.next=57;break}(p=Object.keys(t)).reverse(),d=0,v=p;case 46:if(!(d<v.length)){f.next=55;break}if(y=v[d],g={value:t[y],key:y},e.exclude&&e.exclude(g)){f.next=52;break}return f.next=52,g;case 52:d++,f.next=46;break;case 55:f.next=58;break;case 57:throw"Unsupported type";case 58:case"end":return f.stop()}}),l)}var v=c.mark(y);function y(t){var e,r;return c.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=c.keys(t);case 1:if((n.t1=n.t0()).done){n.next=9;break}if(e=n.t1.value,"$"===(r=e.substr(0,1))||"_"===r){n.next=7;break}return n.next=7,{key:e,value:t[e]};case 7:n.next=1;break;case 9:case"end":return n.stop()}}),v)}var g={data:function(){return{windowSize:{innerWidth:window.innerWidth,innerHeight:window.innerHeight,outerWidth:window.outerWidth,outerHeight:window.outerHeight}}},methods:{updateWindowSize:function(){Object.assign(this.windowSize,{innerWidth:window.innerWidth,innerHeight:window.innerHeight,outerWidth:window.outerWidth,outerHeight:window.outerHeight})}},created:function(){var t=this;this._windowSize_onresize=function(){t.updateWindowSize(),t.$emit("window-resize")},function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];t.addEventListener?t.addEventListener.apply(t,[e,r].concat(o)):t.attachEvent&&t.attachEvent.apply(t,["on".concat(e),r].concat(o))}(window,"resize",this._windowSize_onresize)},beforeDestroy:function(){!function(t,e,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];t.removeEventListener?t.removeEventListener.apply(t,[e,r].concat(o)):t.detachEvent&&t.detachEvent.apply(t,["on".concat(e),r].concat(o))}(window,"resize",this._windowSize_onresize)}};var w={methods:{_getNonPropHooksByName:function(t){if(this._hooks)return this._hooks[t]},addHook:function(t,e){this._getNonPropHooksByName(t)||(this._hooks||(this._hooks={}),this._hooks[t]||(this._hooks[t]=[])),this._hooks[t].push(e)},removeHook:function(t,e){var r=this._getNonPropHooksByName(t);r&&function(t,e){for(var r,n=0;(r=t.indexOf(e))>-1;)t.splice(r,1),n++}(r,e)},hasHook:function(t){return this._getNonPropHooksByName(t)||this[t]},executeHook:function(t,e){var r=this,n=this._getNonPropHooksByName(t);return n=n?n.slice():[],this[t]&&p(this[t])&&n.push((function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r[t].apply(r,o)})),function(t){var e=function(){},r=!0,n=!1,o=void 0;try{for(var i,a=d(t,{reverse:!0})[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){e=c(i.value.value,e)}}catch(t){n=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw o}}return e;function c(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.apply(void 0,[e].concat(n))}}}(n).apply(void 0,o(e))}}},m={data:function(){var t=this;return{mounted:new Promise((function(e,r){t._mounted_resolve=e}))}},mounted:function(){this._mounted_resolve()}};t.doWatch=function(t,e){var r,n;return function o(){var i=e.call(t,r);n=t.$watch(i,(function(t){n(),r=t,o()}))}(),function(){return n&&n()}},t.hookHelper=w,t.isPropTrue=function(t){return""===t||t},t.iterateObjectWithoutDollarDash=y,t.mountedMixin=m,t.registerPreventURLChange=function(t,e,r){var n=!1,o="It looks like you have been editing something.\nIf you leave before saving, your changes will be lost.";e.beforeEach((function(e,i,a){n?window.confirm(r||o)?(t.allowURLChange(),a()):a(!1):a()}));var i=function(t){var e=r||o;return t.returnValue=e,e};t.preventURLChange=t.prototype.$preventURLChange=function(t){null!=t&&(r=t),n||(n=!0,window.addEventListener("beforeunload",i))},t.allowURLChange=t.prototype.$allowURLChange=function(){n=!1,window.removeEventListener("beforeunload",i)}},t.updatablePropsEvenUnbound=function(t){t=p(t)?t():Object.assign({},t);var e={},r=function(r){var n=t[r];n.$localName||(n.$localName="localProps_".concat(r)),n.$localSetter||(n.$localSetter=function(t){return t});var o={};e[r]=o,Object.keys(t[r]).forEach((function(t){"$"!==t[0]&&(o[t]=n[t])}))};for(var n in t)r(n);for(var o={props:e,computed:{},watch:{},data:function(){for(var e={localValueOfUpdatableProps:{}},r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];e.localValueOfUpdatableProps[o]=this[o]}return e}},i=function(){var e=c[a],r=t[e];o.watch[e]=function(t){this.localValueOfUpdatableProps[e]=r.$localSetter(t,this)};var n=r.$localName;o.computed[n]={get:function(){return this.localValueOfUpdatableProps[e]},set:function(t){"value"===e?this.$emit("input",t):this.$emit("update:".concat(e),t),this.localValueOfUpdatableProps[e]=r.$localSetter(t,this)}}},a=0,c=Object.keys(t);a<c.length;a++)i();return o},t.watchAsync=function(t,e,r,n){var o=[],i=-1;return u(),a;function a(){o.forEach((function(t){return t()})),o=[]}function c(e,r){var n,i=!0,a=t.$watch((function(){return e.call(t,c)}),(function(t){n=t,i?i=!1:u()}),{immediate:!0,deep:r&&r.deep});return o.push(a),n}function u(){a();var o=e.call(t,c),u=++i;void 0;var s,f=function(e){u===i&&(0===u?n&&n.immediate&&r.call(t,e,void 0):r.call(t,e,void 0))};s=o,"[object Promise]"===Object.prototype.toString.call(s)?o.then(f):f(o)}},t.windowSize=g,Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "vue-functions", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "", | ||
@@ -23,9 +23,9 @@ "main": "dist/vue-functions.cjs.js", | ||
"devDependencies": { | ||
"rogo": "^1.0.0" | ||
"rogo": "^1.0.4" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.7.7", | ||
"helper-js": "^1.4.27" | ||
"helper-js": "^1.4.33" | ||
}, | ||
"license": "MIT" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78728
1915
Updatedhelper-js@^1.4.33