Comparing version 4.0.1 to 4.0.2
@@ -1,2 +0,2 @@ | ||
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function o(t){var e,n;return!1!==u(t)&&(void 0===(e=t.constructor)||!1!==u(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}var i={silent:!1},c=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=f(t)?function(){return[].concat(t)}:o(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return n&&(r.validate={value:function(){}}),e.validator||(e.validator=function(){return!0}),Object.defineProperties(e,r)}var s=function(){return a("any",{},!0)},l=function(){return a("func",{type:Function},!0)},d=function(){return a("bool",{type:Boolean},!0)},y=function(){return a("string",{type:String},!0)},p=function(){return a("number",{type:Number},!0)},b=function(){return a("array",{type:Array},!0)},v=function(){return a("object",{type:Object},!0)},g=function(){return a("symbol")},h=function(){return a("integer",{type:Number})},O=function(t){return a("oneOf")},j=function(t){return a("custom")},m=function(t){return a("instanceOf",{type:t})},k=function(t){return a("oneOfType")},_=function(t){return a("arrayOf",{type:Array})},w=function(t){return a("objectOf",{type:Object})},P=function(t){return c(a("shape",{type:Object}),"loose",{get:function(){return this}})};function T(t,e,n,r,u){var o;void 0===r&&(r=!1),void 0===u&&(u=!1);var i=((o={})[r?"get":"value"]=function(){return a(e,n,u).def(r?t.defaults[e]:void 0)},o);return c(t,e,i)}function A(t,e,n){void 0===n&&(n={});var r=a(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var N=function(t,e){return a(t,e,!0)},x=function(t,e){return a(t,e)},D=function(){var t,n;return n=t=function(){function t(){}return t.extend=function(t){var e=t.validate,n=t.getter,r=void 0!==n&&n,u=t.type,i=void 0===u?null:u;return T(this,t.name,{type:o(i)&&i.type?null:i},r,!!e)},e(t,null,[{key:"any",get:function(){return s()}},{key:"func",get:function(){return l().def(this.defaults.func)}},{key:"bool",get:function(){return d().def(this.defaults.bool)}},{key:"string",get:function(){return y().def(this.defaults.string)}},{key:"number",get:function(){return p().def(this.defaults.number)}},{key:"array",get:function(){return b().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return h().def(this.defaults.integer)}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=i,t.oneOf=O,t.custom=j,t.instanceOf=m,t.oneOfType=k,t.arrayOf=_,t.objectOf=w,t.shape=P,t.utils={toType:a,validate:function(){return!![].slice.call(arguments)}},n}();function S(t){var r,u;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),u=r=function(r){function u(){return r.apply(this,arguments)||this}return n(u,r),e(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(D),r.defaults=Object.assign({},t),u}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var V=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(S());export default V;export{s as any,b as array,_ as arrayOf,d as bool,i as config,S as createTypes,j as custom,A as fromType,l as func,m as instanceOf,h as integer,p as number,v as object,w as objectOf,O as oneOf,k as oneOfType,P as shape,y as string,g as symbol,x as toType,N as toValidableType}; | ||
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return"[object Object]"===Object.prototype.toString.call(t)}function o(t){var e,n;return!1!==u(t)&&(void 0===(e=t.constructor)||!1!==u(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}var i={silent:!1},f=Object.defineProperty,c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=c(t)?function(){return[].concat(t)}:o(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return n&&(r.validate={value:function(){}}),e.validator||(e.validator=function(){return!0}),Object.defineProperties(e,r)}var s=function(){return a("any",{},!0)},l=function(){return a("func",{type:Function},!0)},d=function(){return a("bool",{type:Boolean},!0)},y=function(){return a("string",{type:String},!0)},p=function(){return a("number",{type:Number},!0)},b=function(){return a("array",{type:Array},!0)},v=function(){return a("object",{type:Object},!0)},g=function(){return a("symbol")},h=function(){return a("integer",{type:Number})},O=function(t){return a("oneOf")},j=function(t){return a("custom")},m=function(t){return a("instanceOf",{type:t})},k=function(t){return a("oneOfType")},_=function(t){return a("arrayOf",{type:Array})},w=function(t){return a("objectOf",{type:Object})},P=function(t){return f(a("shape",{type:Object}),"loose",{get:function(){return this}})};function T(t,e,n,r,u){var o;void 0===r&&(r=!1),void 0===u&&(u=!1);var i=((o={})[r?"get":"value"]=function(){return a(e,n,u).def(r?t.defaults[e]:void 0)},o);return f(t,e,i)}function A(t,e,n){void 0===n&&(n={});var r=a(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var x=function(t,e){return a(t,e,!0)},N=function(t,e){return a(t,e)},D=function(){var t,n;return n=t=function(){function t(){}return t.extend=function(t){var e=this;if(c(t))return t.forEach(function(t){return e.extend(t)}),this;var n=t.validate,r=t.getter,u=void 0!==r&&r,i=t.type,f=void 0===i?null:i;return T(this,t.name,{type:o(f)&&f.type?null:f},u,!!n)},e(t,null,[{key:"any",get:function(){return s()}},{key:"func",get:function(){return l().def(this.defaults.func)}},{key:"bool",get:function(){return d().def(this.defaults.bool)}},{key:"string",get:function(){return y().def(this.defaults.string)}},{key:"number",get:function(){return p().def(this.defaults.number)}},{key:"array",get:function(){return b().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return h().def(this.defaults.integer)}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=i,t.oneOf=O,t.custom=j,t.instanceOf=m,t.oneOfType=k,t.arrayOf=_,t.objectOf=w,t.shape=P,t.utils={toType:a,validate:function(){return!![].slice.call(arguments)}},n}();function E(t){var r,u;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),u=r=function(r){function u(){return r.apply(this,arguments)||this}return n(u,r),e(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(D),r.defaults=Object.assign({},t),u}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var S=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(E());export default S;export{s as any,b as array,_ as arrayOf,d as bool,i as config,E as createTypes,j as custom,A as fromType,l as func,m as instanceOf,h as integer,p as number,v as object,w as objectOf,O as oneOf,k as oneOfType,P as shape,y as string,g as symbol,N as toType,x as toValidableType}; | ||
//# sourceMappingURL=shim.m.js.map |
@@ -1,2 +0,2 @@ | ||
function t(t){return"[object Object]"===Object.prototype.toString.call(t)}function e(e){var r,n;return!1!==t(e)&&(void 0===(r=e.constructor)||!1!==t(n=r.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const r={silent:!1},n=Object.defineProperty,s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,r={},n=!1){const i={_vueTypes_name:{value:t,writable:!0},def:{value(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=s(t)?()=>[].concat(t):e(t)?()=>Object.assign({},t):t,this)}},isRequired:{get(){return this.required=!0,this}}};return n&&(i.validate={value(){}}),r.validator||(r.validator=()=>!0),Object.defineProperties(r,i)}const a=()=>i("any",{},!0),o=()=>i("func",{type:Function},!0),u=()=>i("bool",{type:Boolean},!0),c=()=>i("string",{type:String},!0),l=()=>i("number",{type:Number},!0),f=()=>i("array",{type:Array},!0),d=()=>i("object",{type:Object},!0),p=()=>i("symbol"),y=()=>i("integer",{type:Number}),b=t=>i("oneOf"),g=t=>i("custom"),h=t=>i("instanceOf",{type:t}),O=t=>i("oneOfType"),v=t=>i("arrayOf",{type:Array}),j=t=>i("objectOf",{type:Object}),m=t=>n(i("shape",{type:Object}),"loose",{get(){return this}});function T(t,e,r,s=!1,a=!1){return n(t,e,{[s?"get":"value"]:()=>i(e,r,a).def(s?t.defaults[e]:void 0)})}function w(t,e,r={}){const n=i(t,Object.assign({},e,r),!!e.validable);return n.validator&&delete n.validator,n}const x=(t,e)=>i(t,e,!0),A=(t,e)=>i(t,e),D=(()=>{var t,n;return n=t=class{static get any(){return a()}static get func(){return o().def(this.defaults.func)}static get bool(){return u().def(this.defaults.bool)}static get string(){return c().def(this.defaults.string)}static get number(){return l().def(this.defaults.number)}static get array(){return f().def(this.defaults.array)}static get object(){return d().def(this.defaults.object)}static get symbol(){return p()}static get integer(){return y().def(this.defaults.integer)}static extend(t){const{name:r,validate:n,getter:s=!1,type:i=null}=t;return T(this,r,{type:e(i)&&i.type?null:i},s,!!n)}},t.defaults={},t.sensibleDefaults=void 0,t.config=r,t.oneOf=b,t.custom=g,t.instanceOf=h,t.oneOfType=O,t.arrayOf=v,t.objectOf=j,t.shape=m,t.utils={toType:i,validate:(...t)=>!!t},n})();function N(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e,r;return r=e=class extends D{static get sensibleDefaults(){return Object.assign({},this.defaults)}static set sensibleDefaults(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}},e.defaults=Object.assign({},t),r}"production"!==process.env.NODE_ENV&&!1===r.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");class P extends(N()){}export default P;export{a as any,f as array,v as arrayOf,u as bool,r as config,N as createTypes,g as custom,w as fromType,o as func,h as instanceOf,y as integer,l as number,d as object,j as objectOf,b as oneOf,O as oneOfType,m as shape,c as string,p as symbol,A as toType,x as toValidableType}; | ||
function t(t){return"[object Object]"===Object.prototype.toString.call(t)}function e(e){var r,n;return!1!==t(e)&&(void 0===(r=e.constructor)||!1!==t(n=r.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const r={silent:!1},n=Object.defineProperty,s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,r={},n=!1){const i={_vueTypes_name:{value:t,writable:!0},def:{value(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=s(t)?()=>[].concat(t):e(t)?()=>Object.assign({},t):t,this)}},isRequired:{get(){return this.required=!0,this}}};return n&&(i.validate={value(){}}),r.validator||(r.validator=()=>!0),Object.defineProperties(r,i)}const a=()=>i("any",{},!0),o=()=>i("func",{type:Function},!0),u=()=>i("bool",{type:Boolean},!0),c=()=>i("string",{type:String},!0),l=()=>i("number",{type:Number},!0),f=()=>i("array",{type:Array},!0),d=()=>i("object",{type:Object},!0),p=()=>i("symbol"),y=()=>i("integer",{type:Number}),b=t=>i("oneOf"),g=t=>i("custom"),h=t=>i("instanceOf",{type:t}),O=t=>i("oneOfType"),v=t=>i("arrayOf",{type:Array}),j=t=>i("objectOf",{type:Object}),m=t=>n(i("shape",{type:Object}),"loose",{get(){return this}});function x(t,e,r,s=!1,a=!1){return n(t,e,{[s?"get":"value"]:()=>i(e,r,a).def(s?t.defaults[e]:void 0)})}function T(t,e,r={}){const n=i(t,Object.assign({},e,r),!!e.validable);return n.validator&&delete n.validator,n}const w=(t,e)=>i(t,e,!0),A=(t,e)=>i(t,e),D=(()=>{var t,n;return n=t=class{static get any(){return a()}static get func(){return o().def(this.defaults.func)}static get bool(){return u().def(this.defaults.bool)}static get string(){return c().def(this.defaults.string)}static get number(){return l().def(this.defaults.number)}static get array(){return f().def(this.defaults.array)}static get object(){return d().def(this.defaults.object)}static get symbol(){return p()}static get integer(){return y().def(this.defaults.integer)}static extend(t){if(s(t))return t.forEach(t=>this.extend(t)),this;const{name:r,validate:n,getter:i=!1,type:a=null}=t;return x(this,r,{type:e(a)&&a.type?null:a},i,!!n)}},t.defaults={},t.sensibleDefaults=void 0,t.config=r,t.oneOf=b,t.custom=g,t.instanceOf=h,t.oneOfType=O,t.arrayOf=v,t.objectOf=j,t.shape=m,t.utils={toType:i,validate:(...t)=>!!t},n})();function N(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e,r;return r=e=class extends D{static get sensibleDefaults(){return Object.assign({},this.defaults)}static set sensibleDefaults(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}},e.defaults=Object.assign({},t),r}"production"!==process.env.NODE_ENV&&!1===r.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");class P extends(N()){}export default P;export{a as any,f as array,v as arrayOf,u as bool,r as config,N as createTypes,g as custom,T as fromType,o as func,h as instanceOf,y as integer,l as number,d as object,j as objectOf,b as oneOf,O as oneOfType,m as shape,c as string,p as symbol,A as toType,w as toValidableType}; | ||
//# sourceMappingURL=shim.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).VueTypes={})}(this,function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function i(t){var e,n;return!1!==o(t)&&(void 0===(e=t.constructor)||!1!==o(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}var f={silent:!1},c=Object.defineProperty,a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function s(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=a(t)?function(){return[].concat(t)}:i(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return n&&(r.validate={value:function(){}}),e.validator||(e.validator=function(){return!0}),Object.defineProperties(e,r)}var l=function(){return s("any",{},!0)},y=function(){return s("func",{type:Function},!0)},d=function(){return s("bool",{type:Boolean},!0)},p=function(){return s("string",{type:String},!0)},b=function(){return s("number",{type:Number},!0)},v=function(){return s("array",{type:Array},!0)},g=function(){return s("object",{type:Object},!0)},O=function(){return s("symbol")},h=function(){return s("integer",{type:Number})},j=function(t){return s("oneOf")},m=function(t){return s("custom")},T=function(t){return s("instanceOf",{type:t})},k=function(t){return s("oneOfType")},P=function(t){return s("arrayOf",{type:Array})},_=function(t){return s("objectOf",{type:Object})},A=function(t){return c(s("shape",{type:Object}),"loose",{get:function(){return this}})};function x(t,e,n,r,u){var o;void 0===r&&(r=!1),void 0===u&&(u=!1);var i=((o={})[r?"get":"value"]=function(){return s(e,n,u).def(r?t.defaults[e]:void 0)},o);return c(t,e,i)}var w=function(){var t,e;return e=t=function(){function t(){}return t.extend=function(t){var e=t.validate,n=t.getter,r=void 0!==n&&n,u=t.type,o=void 0===u?null:u;return x(this,t.name,{type:i(o)&&o.type?null:o},r,!!e)},n(t,null,[{key:"any",get:function(){return l()}},{key:"func",get:function(){return y().def(this.defaults.func)}},{key:"bool",get:function(){return d().def(this.defaults.bool)}},{key:"string",get:function(){return p().def(this.defaults.string)}},{key:"number",get:function(){return b().def(this.defaults.number)}},{key:"array",get:function(){return v().def(this.defaults.array)}},{key:"object",get:function(){return g().def(this.defaults.object)}},{key:"symbol",get:function(){return O()}},{key:"integer",get:function(){return h().def(this.defaults.integer)}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=f,t.oneOf=j,t.custom=m,t.instanceOf=T,t.oneOfType=k,t.arrayOf=P,t.objectOf=_,t.shape=A,t.utils={toType:s,validate:function(){return!![].slice.call(arguments)}},e}();function S(t){var e,u;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),u=e=function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(w),e.defaults=Object.assign({},t),u}var q=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(S());t.any=l,t.array=v,t.arrayOf=P,t.bool=d,t.config=f,t.createTypes=S,t.custom=m,t.default=q,t.fromType=function(t,e,n){void 0===n&&(n={});var r=s(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=y,t.instanceOf=T,t.integer=h,t.number=b,t.object=g,t.objectOf=_,t.oneOf=j,t.oneOfType=k,t.shape=A,t.string=p,t.symbol=O,t.toType=function(t,e){return s(t,e)},t.toValidableType=function(t,e){return s(t,e,!0)}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).VueTypes={})}(this,function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function i(t){var e,n;return!1!==o(t)&&(void 0===(e=t.constructor)||!1!==o(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}var f={silent:!1},c=Object.defineProperty,a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function s(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=a(t)?function(){return[].concat(t)}:i(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return n&&(r.validate={value:function(){}}),e.validator||(e.validator=function(){return!0}),Object.defineProperties(e,r)}var l=function(){return s("any",{},!0)},y=function(){return s("func",{type:Function},!0)},d=function(){return s("bool",{type:Boolean},!0)},p=function(){return s("string",{type:String},!0)},b=function(){return s("number",{type:Number},!0)},v=function(){return s("array",{type:Array},!0)},g=function(){return s("object",{type:Object},!0)},O=function(){return s("symbol")},h=function(){return s("integer",{type:Number})},j=function(t){return s("oneOf")},m=function(t){return s("custom")},T=function(t){return s("instanceOf",{type:t})},k=function(t){return s("oneOfType")},P=function(t){return s("arrayOf",{type:Array})},_=function(t){return s("objectOf",{type:Object})},x=function(t){return c(s("shape",{type:Object}),"loose",{get:function(){return this}})};function A(t,e,n,r,u){var o;void 0===r&&(r=!1),void 0===u&&(u=!1);var i=((o={})[r?"get":"value"]=function(){return s(e,n,u).def(r?t.defaults[e]:void 0)},o);return c(t,e,i)}var w=function(){var t,e;return e=t=function(){function t(){}return t.extend=function(t){var e=this;if(a(t))return t.forEach(function(t){return e.extend(t)}),this;var n=t.validate,r=t.getter,u=void 0!==r&&r,o=t.type,f=void 0===o?null:o;return A(this,t.name,{type:i(f)&&f.type?null:f},u,!!n)},n(t,null,[{key:"any",get:function(){return l()}},{key:"func",get:function(){return y().def(this.defaults.func)}},{key:"bool",get:function(){return d().def(this.defaults.bool)}},{key:"string",get:function(){return p().def(this.defaults.string)}},{key:"number",get:function(){return b().def(this.defaults.number)}},{key:"array",get:function(){return v().def(this.defaults.array)}},{key:"object",get:function(){return g().def(this.defaults.object)}},{key:"symbol",get:function(){return O()}},{key:"integer",get:function(){return h().def(this.defaults.integer)}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=f,t.oneOf=j,t.custom=m,t.instanceOf=T,t.oneOfType=k,t.arrayOf=P,t.objectOf=_,t.shape=x,t.utils={toType:s,validate:function(){return!![].slice.call(arguments)}},e}();function S(t){var e,u;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),u=e=function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(w),e.defaults=Object.assign({},t),u}var q=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(S());t.any=l,t.array=v,t.arrayOf=P,t.bool=d,t.config=f,t.createTypes=S,t.custom=m,t.default=q,t.fromType=function(t,e,n){void 0===n&&(n={});var r=s(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=y,t.instanceOf=T,t.integer=h,t.number=b,t.object=g,t.objectOf=_,t.oneOf=j,t.oneOfType=k,t.shape=x,t.string=p,t.symbol=O,t.toType=function(t,e){return s(t,e)},t.toValidableType=function(t,e){return s(t,e,!0)}}); | ||
//# sourceMappingURL=shim.umd.js.map |
{ | ||
"name": "vue-types", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Prop types utility for Vue", | ||
@@ -70,16 +70,16 @@ "author": "Marco Solazzi", | ||
"@types/jest": "26.0.24", | ||
"@types/node": "14.17.5", | ||
"@typescript-eslint/eslint-plugin": "4.28.3", | ||
"@typescript-eslint/parser": "4.28.3", | ||
"@types/node": "14.17.9", | ||
"@typescript-eslint/eslint-plugin": "4.29.0", | ||
"@typescript-eslint/parser": "4.29.0", | ||
"babel-plugin-transform-node-env-inline": "0.4.3", | ||
"browser-sync": "2.27.4", | ||
"browser-sync": "2.27.5", | ||
"cpy-cli": "3.1.1", | ||
"cross-env": "7.0.3", | ||
"del": "6.0.0", | ||
"del-cli": "4.0.0", | ||
"eslint": "7.30.0", | ||
"del-cli": "4.0.1", | ||
"eslint": "7.32.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-prettier": "3.4.0", | ||
"eslint-plugin-vue": "7.13.0", | ||
"eslint-plugin-vue": "7.15.1", | ||
"jest": "27.0.6", | ||
@@ -89,6 +89,6 @@ "microbundle": "0.13.3", | ||
"prettier": "2.3.2", | ||
"ts-jest": "27.0.3", | ||
"ts-jest": "27.0.4", | ||
"typescript": "4.3.5", | ||
"vue2": "npm:vue@2.6.14", | ||
"vue3": "npm:vue@3.1.4", | ||
"vue3": "npm:vue@3.1.5", | ||
"vuepress": "1.8.2" | ||
@@ -95,0 +95,0 @@ }, |
@@ -162,2 +162,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
static extend<T = any>(props: any): T { | ||
if (isArray(props)) { | ||
props.forEach((p) => this.extend(p)) | ||
return this as any | ||
} | ||
const { name, validate, getter = false, type = null } = props | ||
@@ -164,0 +168,0 @@ // If we are inheriting from a custom type, let's ignore the type property |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
311878
1934