Comparing version 4.0.1 to 4.1.0
@@ -0,1 +1,16 @@ | ||
<a name="4.1.0"></a> | ||
# [4.1.0](https://github.com/kazupon/vue-i18n/compare/v4.0.1...v4.1.0) (2016-07-25) | ||
### :bug: Bug Fixes | ||
* **util:** fixed isArray reference errors ([0c6f6a0](https://github.com/kazupon/vue-i18n/commit/0c6f6a0)) | ||
### :star: New Features | ||
* support vue 2.0.0.beta later ([0e1d2f7](https://github.com/kazupon/vue-i18n/commit/0e1d2f7)) | ||
<a name="4.0.1"></a> | ||
@@ -2,0 +17,0 @@ ## [4.0.1](https://github.com/kazupon/vue-i18n/compare/v4.0.0...v4.0.1) (2016-06-06) |
/*! | ||
* vue-i18n v4.0.1 | ||
* vue-i18n v4.1.0 | ||
* (c) 2016 kazuya kawaguchi | ||
@@ -437,64 +437,2 @@ * Released under the MIT License. | ||
/** | ||
* Version compare | ||
* - Inspired: | ||
* https://github.com/omichelsen/compare-versions | ||
*/ | ||
var PATCH_PATTERN = /-([\w-.]+)/; | ||
function split(v) { | ||
var temp = v.split('.'); | ||
var arr = temp.splice(0, 2); | ||
arr.push(temp.join('.')); | ||
return arr; | ||
} | ||
/** | ||
* compare | ||
* | ||
* @param {String} v1 | ||
* @param {String} v2 | ||
* @return {Number} | ||
*/ | ||
function compare (v1, v2) { | ||
var s1 = split(v1); | ||
var s2 = split(v2); | ||
/* eslint-disable prefer-const */ | ||
for (var i = 0; i < 3; i++) { | ||
var n1 = parseInt(s1[i] || 0, 10); | ||
var n2 = parseInt(s2[i] || 0, 10); | ||
if (n1 > n2) { | ||
return 1; | ||
} | ||
if (n2 > n1) { | ||
return -1; | ||
} | ||
} | ||
/* eslint-enable prefer-const */ | ||
if ((s1[2] + s2[2] + '').indexOf('-') > -1) { | ||
var p1 = (PATCH_PATTERN.exec(s1[2]) || [''])[0]; | ||
var p2 = (PATCH_PATTERN.exec(s2[2]) || [''])[0]; | ||
if (p1 === '') { | ||
return 1; | ||
} | ||
if (p2 === '') { | ||
return -1; | ||
} | ||
if (p1 > p2) { | ||
return 1; | ||
} | ||
if (p2 > p1) { | ||
return -1; | ||
} | ||
} | ||
return 0; | ||
} | ||
var locales = Object.create(null); // locales store | ||
@@ -712,5 +650,3 @@ | ||
function Extend (Vue) { | ||
var _Vue$util = Vue.util; | ||
var isArray = _Vue$util.isArray; | ||
var isObject = _Vue$util.isObject; | ||
var isObject = Vue.util.isObject; | ||
@@ -725,3 +661,3 @@ | ||
if (args.length === 1) { | ||
if (isObject(args[0]) || isArray(args[0])) { | ||
if (isObject(args[0]) || Array.isArray(args[0])) { | ||
args = args[0]; | ||
@@ -735,3 +671,3 @@ } else if (typeof args[0] === 'string') { | ||
} | ||
if (isObject(args[1]) || isArray(args[1])) { | ||
if (isObject(args[1]) || Array.isArray(args[1])) { | ||
args = args[1]; | ||
@@ -829,2 +765,4 @@ } | ||
var version = Vue.version && Number(Vue.version.split('.')[0]) || -1; | ||
if (process.env.NODE_ENV !== 'production' && plugin.installed) { | ||
@@ -835,3 +773,3 @@ warn('already installed.'); | ||
if (process.env.NODE_ENV !== 'production' && (!Vue.version || compare(Vue.version, '1.0') < 0)) { | ||
if (process.env.NODE_ENV !== 'production' && version < 1) { | ||
warn('vue-i18n (' + plugin.version + ') need to use vue version 1.0 or later (vue version: ' + Vue.version + ').'); | ||
@@ -862,3 +800,3 @@ return; | ||
plugin.version = '4.0.1'; | ||
plugin.version = '4.1.0'; | ||
@@ -865,0 +803,0 @@ if (typeof window !== 'undefined' && window.Vue) { |
/*! | ||
* vue-i18n v4.0.1 | ||
* vue-i18n v4.1.0 | ||
* (c) 2016 kazuya kawaguchi | ||
@@ -441,64 +441,2 @@ * Released under the MIT License. | ||
/** | ||
* Version compare | ||
* - Inspired: | ||
* https://github.com/omichelsen/compare-versions | ||
*/ | ||
var PATCH_PATTERN = /-([\w-.]+)/; | ||
function split(v) { | ||
var temp = v.split('.'); | ||
var arr = temp.splice(0, 2); | ||
arr.push(temp.join('.')); | ||
return arr; | ||
} | ||
/** | ||
* compare | ||
* | ||
* @param {String} v1 | ||
* @param {String} v2 | ||
* @return {Number} | ||
*/ | ||
function compare (v1, v2) { | ||
var s1 = split(v1); | ||
var s2 = split(v2); | ||
/* eslint-disable prefer-const */ | ||
for (var i = 0; i < 3; i++) { | ||
var n1 = parseInt(s1[i] || 0, 10); | ||
var n2 = parseInt(s2[i] || 0, 10); | ||
if (n1 > n2) { | ||
return 1; | ||
} | ||
if (n2 > n1) { | ||
return -1; | ||
} | ||
} | ||
/* eslint-enable prefer-const */ | ||
if ((s1[2] + s2[2] + '').indexOf('-') > -1) { | ||
var p1 = (PATCH_PATTERN.exec(s1[2]) || [''])[0]; | ||
var p2 = (PATCH_PATTERN.exec(s2[2]) || [''])[0]; | ||
if (p1 === '') { | ||
return 1; | ||
} | ||
if (p2 === '') { | ||
return -1; | ||
} | ||
if (p1 > p2) { | ||
return 1; | ||
} | ||
if (p2 > p1) { | ||
return -1; | ||
} | ||
} | ||
return 0; | ||
} | ||
var locales = Object.create(null); // locales store | ||
@@ -716,5 +654,3 @@ | ||
function Extend (Vue) { | ||
var _Vue$util = Vue.util; | ||
var isArray = _Vue$util.isArray; | ||
var isObject = _Vue$util.isObject; | ||
var isObject = Vue.util.isObject; | ||
@@ -729,3 +665,3 @@ | ||
if (args.length === 1) { | ||
if (isObject(args[0]) || isArray(args[0])) { | ||
if (isObject(args[0]) || Array.isArray(args[0])) { | ||
args = args[0]; | ||
@@ -739,3 +675,3 @@ } else if (typeof args[0] === 'string') { | ||
} | ||
if (isObject(args[1]) || isArray(args[1])) { | ||
if (isObject(args[1]) || Array.isArray(args[1])) { | ||
args = args[1]; | ||
@@ -833,2 +769,4 @@ } | ||
var version = Vue.version && Number(Vue.version.split('.')[0]) || -1; | ||
if ('development' !== 'production' && plugin.installed) { | ||
@@ -839,3 +777,3 @@ warn('already installed.'); | ||
if ('development' !== 'production' && (!Vue.version || compare(Vue.version, '1.0') < 0)) { | ||
if ('development' !== 'production' && version < 1) { | ||
warn('vue-i18n (' + plugin.version + ') need to use vue version 1.0 or later (vue version: ' + Vue.version + ').'); | ||
@@ -866,3 +804,3 @@ return; | ||
plugin.version = '4.0.1'; | ||
plugin.version = '4.1.0'; | ||
@@ -869,0 +807,0 @@ if (typeof window !== 'undefined' && window.Vue) { |
/*! | ||
* vue-i18n v4.0.1 | ||
* vue-i18n v4.1.0 | ||
* (c) 2016 kazuya kawaguchi | ||
* Released under the MIT License. | ||
*/ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.VueI18n=t()}(this,function(){"use strict";function n(n,t){window.console&&(console.warn("[vue-i18n] "+n),t&&console.warn(t.stack))}function t(n,t){return j.call(n,t)}function e(n){if(null===n||void 0===n)return!0;if(Array.isArray(n)){if(n.length>0)return!1;if(0===n.length)return!0}else if(m.Vue.util.isPlainObject(n))for(var e in n)if(t(n,e))return!1;return!0}function r(n){if(!A){var t=n.$watch("__watcher__",function(n){});A=n._watchers[0].constructor,t()}return A}function o(n){return O||(O=n._data.__ob__.dep.constructor),O}function i(n){return n&&"function"==typeof n.then}function u(n){if(void 0===n)return"eof";var t=n.charCodeAt(0);switch(t){case 91:case 93:case 46:case 34:case 39:case 48:return n;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return t>=97&&122>=t||t>=65&&90>=t?"ident":t>=49&&57>=t?"number":"else"}function a(n){var t=$.Vue.util,e=t.isLiteral,r=t.stripQuotes,o=n.trim();return"0"===n.charAt(0)&&isNaN(n)?!1:e(o)?r(o):"*"+o}function c(n){function t(){var t=n[r+1];return o===I&&"'"===t||o===L&&'"'===t?(r++,l="\\"+t,h[P](),!0):void 0}var e=[],r=-1,o=C,i=0,c=void 0,l=void 0,f=void 0,s=void 0,d=void 0,v=void 0,p=void 0,h=[];for(h[k]=function(){void 0!==f&&(e.push(f),f=void 0)},h[P]=function(){void 0===f?f=l:f+=l},h[S]=function(){h[P](),i++},h[U]=function(){if(i>0)i--,o=N,h[P]();else{if(i=0,f=a(f),f===!1)return!1;h[k]()}};null!=o;)if(r++,c=n[r],"\\"!==c||!t()){if(s=u(c),p=B[o],d=p[s]||p["else"]||Z,d===Z)return;if(o=d[0],v=h[d[1]],v&&(l=d[2],l=void 0===l?c:l,v()===!1))return;if(o===Q)return e.raw=n,e}}function l(n){var t=V[n];return t||(t=c(n),t&&(V[n]=t)),t}function f(n,t){var r=$.Vue.util.isObject;if(!r(n))return null;var o=l(t);if(e(o))return null;for(var i=o.length,u=null,a=n,c=0;i>c;){var f=a[o[c]];if(void 0===f){a=null;break}a=f,c++}return u=a}function s(t){t.locale=function(t,e,r){return void 0===e?D[t]:void(null===e?(D[t]=void 0,delete D[t]):d(t,e,function(e){e?(D[t]=e,r&&r()):n("failed set `"+t+"` locale")}))}}function d(n,t,e){var r=this;"object"===("undefined"==typeof t?"undefined":_["typeof"](t))?e(t):!function(){var n=t.call(r);"function"==typeof n?n.resolved?e(n.resolved):n.requested?n.pendingCallbacks.push(e):!function(){n.requested=!0;var t=n.pendingCallbacks=[e];n(function(e){n.resolved=e;for(var r=0,o=t.length;o>r;r++)t[r](e)},function(){e()})}():i(n)&&n.then(function(n){e(n)},function(){e()})["catch"](function(n){console.error(n),e()})}()}function v(n,t){var e=n.prototype._init;n.prototype._init=function(n){var r=this;n=n||{};var o=n._parent||n.parent||this,i=o.$lang;i?this.$lang=i:this.$lang=t,this._langUnwatch=this.$lang.$watch("lang",function(n,t){p(r)}),e.call(this,n)};var r=n.prototype._destroy;n.prototype._destroy=function(){this._langUnwatch&&(this._langUnwatch(),this._langUnwatch=null),this.$lang=null,r.apply(this,arguments)}}function p(n){for(var t=n._watchers.length;t--;)n._watchers[t].update(!0)}function h(n,t){function e(n,t){var e=new i(t,n,null,{lazy:!0});return function(){return e.dirty&&e.evaluate(),u.target&&e.depend(),e.value}}var i=r(t),u=o(t);Object.defineProperty(n.config,"lang",{enumerable:!0,configurable:!0,get:e(function(){return t.lang},t),set:n.util.bind(function(n){t.lang=n},t)})}function y(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return 1===e.length&&"object"===_["typeof"](e[0])&&(e=e[0]),e&&e.hasOwnProperty||(e={}),n.replace(E,function(t,r,o,i){var u=void 0;return"{"===n[i-1]&&"}"===n[i+t.length]?o:(u=e.hasOwnProperty(o)?e[o]:null,null===u||void 0===u?"":u)})}function g(n){function t(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];var o=n.config.lang;return 1===e.length?u(e[0])||i(e[0])?e=e[0]:"string"==typeof e[0]&&(o=e[0]):2===e.length&&("string"==typeof e[0]&&(o=e[0]),(u(e[1])||i(e[1]))&&(e=e[1])),{lang:o,params:e}}function e(n,t,e){if(!n)return null;var r=f(n,t)||n[t];return r?e?y(r,e):r:null}function r(n){return n}var o=n.util,i=o.isArray,u=o.isObject;return n.t=function(o){for(var i=arguments.length,u=Array(i>1?i-1:0),a=1;i>a;a++)u[a-1]=arguments[a];if(!o)return"";var c=t.apply(void 0,u),l=c.lang,f=c.params;return e(n.locale(l),o,f)||r(o)},n.prototype.$t=function(o){if(!o)return"";for(var i=arguments.length,u=Array(i>1?i-1:0),a=1;i>a;a++)u[a-1]=arguments[a];var c=t.apply(void 0,u),l=c.lang,f=c.params;return e(this.$options.locales&&this.$options.locales[l],o,f)||e(n.locale(l),o,f)||r(o)},n}function w(n){var t=(arguments.length<=1||void 0===arguments[1]?{}:arguments[1],"en");$.Vue=m.Vue=n,b(n,t),s(n),v(n,F),h(n,F),g(n)}function b(n,t){var e=n.config.silent;n.config.silent=!0,F||(F=new n({data:{lang:t}})),n.config.silent=e}var _={};_["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var m={},j=Object.prototype.hasOwnProperty,A=void 0,O=void 0,$={},V=Object.create(null),P=0,k=1,S=2,U=3,C=0,q=1,x=2,z=3,N=4,I=5,L=6,Q=7,Z=8,B=[];B[C]={ws:[C],ident:[z,P],"[":[N],eof:[Q]},B[q]={ws:[q],".":[x],"[":[N],eof:[Q]},B[x]={ws:[x],ident:[z,P]},B[z]={ident:[z,P],0:[z,P],number:[z,P],ws:[q,k],".":[x,k],"[":[N,k],eof:[Q,k]},B[N]={"'":[I,P],'"':[L,P],"[":[N,S],"]":[q,U],eof:Z,"else":[N,P]},B[I]={"'":[N,P],eof:Z,"else":[I,P]},B[L]={'"':[N,P],eof:Z,"else":[L,P]};var D=Object.create(null),E=/(%|)\{([0-9a-zA-Z_]+)\}/g,F=void 0;return w.version="4.0.1","undefined"!=typeof window&&window.Vue&&window.Vue.use(w),w}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.VueI18n=t()}(this,function(){"use strict";function n(n,t){window.console&&(console.warn("[vue-i18n] "+n),t&&console.warn(t.stack))}function t(n,t){return A.call(n,t)}function e(n){if(null===n||void 0===n)return!0;if(Array.isArray(n)){if(n.length>0)return!1;if(0===n.length)return!0}else if(m.Vue.util.isPlainObject(n))for(var e in n)if(t(n,e))return!1;return!0}function r(n){if(!j){var t=n.$watch("__watcher__",function(n){});j=n._watchers[0].constructor,t()}return j}function o(n){return O||(O=n._data.__ob__.dep.constructor),O}function i(n){return n&&"function"==typeof n.then}function u(n){if(void 0===n)return"eof";var t=n.charCodeAt(0);switch(t){case 91:case 93:case 46:case 34:case 39:case 48:return n;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return t>=97&&122>=t||t>=65&&90>=t?"ident":t>=49&&57>=t?"number":"else"}function a(n){var t=$.Vue.util,e=t.isLiteral,r=t.stripQuotes,o=n.trim();return"0"===n.charAt(0)&&isNaN(n)?!1:e(o)?r(o):"*"+o}function c(n){function t(){var t=n[r+1];return o===I&&"'"===t||o===L&&'"'===t?(r++,l="\\"+t,h[P](),!0):void 0}var e=[],r=-1,o=C,i=0,c=void 0,l=void 0,f=void 0,s=void 0,v=void 0,d=void 0,p=void 0,h=[];for(h[k]=function(){void 0!==f&&(e.push(f),f=void 0)},h[P]=function(){void 0===f?f=l:f+=l},h[S]=function(){h[P](),i++},h[U]=function(){if(i>0)i--,o=z,h[P]();else{if(i=0,f=a(f),f===!1)return!1;h[k]()}};null!=o;)if(r++,c=n[r],"\\"!==c||!t()){if(s=u(c),p=B[o],v=p[s]||p["else"]||Z,v===Z)return;if(o=v[0],d=h[v[1]],d&&(l=v[2],l=void 0===l?c:l,d()===!1))return;if(o===Q)return e.raw=n,e}}function l(n){var t=V[n];return t||(t=c(n),t&&(V[n]=t)),t}function f(n,t){var r=$.Vue.util.isObject;if(!r(n))return null;var o=l(t);if(e(o))return null;for(var i=o.length,u=null,a=n,c=0;i>c;){var f=a[o[c]];if(void 0===f){a=null;break}a=f,c++}return u=a}function s(t){t.locale=function(t,e,r){return void 0===e?D[t]:void(null===e?(D[t]=void 0,delete D[t]):v(t,e,function(e){e?(D[t]=e,r&&r()):n("failed set `"+t+"` locale")}))}}function v(n,t,e){var r=this;"object"===("undefined"==typeof t?"undefined":_["typeof"](t))?e(t):!function(){var n=t.call(r);"function"==typeof n?n.resolved?e(n.resolved):n.requested?n.pendingCallbacks.push(e):!function(){n.requested=!0;var t=n.pendingCallbacks=[e];n(function(e){n.resolved=e;for(var r=0,o=t.length;o>r;r++)t[r](e)},function(){e()})}():i(n)&&n.then(function(n){e(n)},function(){e()})["catch"](function(n){console.error(n),e()})}()}function d(n,t){var e=n.prototype._init;n.prototype._init=function(n){var r=this;n=n||{};var o=n._parent||n.parent||this,i=o.$lang;i?this.$lang=i:this.$lang=t,this._langUnwatch=this.$lang.$watch("lang",function(n,t){p(r)}),e.call(this,n)};var r=n.prototype._destroy;n.prototype._destroy=function(){this._langUnwatch&&(this._langUnwatch(),this._langUnwatch=null),this.$lang=null,r.apply(this,arguments)}}function p(n){for(var t=n._watchers.length;t--;)n._watchers[t].update(!0)}function h(n,t){function e(n,t){var e=new i(t,n,null,{lazy:!0});return function(){return e.dirty&&e.evaluate(),u.target&&e.depend(),e.value}}var i=r(t),u=o(t);Object.defineProperty(n.config,"lang",{enumerable:!0,configurable:!0,get:e(function(){return t.lang},t),set:n.util.bind(function(n){t.lang=n},t)})}function y(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;t>r;r++)e[r-1]=arguments[r];return 1===e.length&&"object"===_["typeof"](e[0])&&(e=e[0]),e&&e.hasOwnProperty||(e={}),n.replace(E,function(t,r,o,i){var u=void 0;return"{"===n[i-1]&&"}"===n[i+t.length]?o:(u=e.hasOwnProperty(o)?e[o]:null,null===u||void 0===u?"":u)})}function g(n){function t(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];var i=n.config.lang;return 1===e.length?o(e[0])||Array.isArray(e[0])?e=e[0]:"string"==typeof e[0]&&(i=e[0]):2===e.length&&("string"==typeof e[0]&&(i=e[0]),(o(e[1])||Array.isArray(e[1]))&&(e=e[1])),{lang:i,params:e}}function e(n,t,e){if(!n)return null;var r=f(n,t)||n[t];return r?e?y(r,e):r:null}function r(n){return n}var o=n.util.isObject;return n.t=function(o){for(var i=arguments.length,u=Array(i>1?i-1:0),a=1;i>a;a++)u[a-1]=arguments[a];if(!o)return"";var c=t.apply(void 0,u),l=c.lang,f=c.params;return e(n.locale(l),o,f)||r(o)},n.prototype.$t=function(o){if(!o)return"";for(var i=arguments.length,u=Array(i>1?i-1:0),a=1;i>a;a++)u[a-1]=arguments[a];var c=t.apply(void 0,u),l=c.lang,f=c.params;return e(this.$options.locales&&this.$options.locales[l],o,f)||e(n.locale(l),o,f)||r(o)},n}function w(n){var t=(arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n.version&&Number(n.version.split(".")[0])||-1,"en");$.Vue=m.Vue=n,b(n,t),s(n),d(n,F),h(n,F),g(n)}function b(n,t){var e=n.config.silent;n.config.silent=!0,F||(F=new n({data:{lang:t}})),n.config.silent=e}var _={};_["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var m={},A=Object.prototype.hasOwnProperty,j=void 0,O=void 0,$={},V=Object.create(null),P=0,k=1,S=2,U=3,C=0,N=1,q=2,x=3,z=4,I=5,L=6,Q=7,Z=8,B=[];B[C]={ws:[C],ident:[x,P],"[":[z],eof:[Q]},B[N]={ws:[N],".":[q],"[":[z],eof:[Q]},B[q]={ws:[q],ident:[x,P]},B[x]={ident:[x,P],0:[x,P],number:[x,P],ws:[N,k],".":[q,k],"[":[z,k],eof:[Q,k]},B[z]={"'":[I,P],'"':[L,P],"[":[z,S],"]":[N,U],eof:Z,"else":[z,P]},B[I]={"'":[z,P],eof:Z,"else":[I,P]},B[L]={'"':[z,P],eof:Z,"else":[L,P]};var D=Object.create(null),E=/(%|)\{([0-9a-zA-Z_]+)\}/g,F=void 0;return w.version="4.1.0","undefined"!=typeof window&&window.Vue&&window.Vue.use(w),w}); |
{ | ||
"name": "vue-i18n", | ||
"description": "Internationalization plugin for Vue.js", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"author": { | ||
@@ -21,3 +21,3 @@ "name": "kazuya kawaguchi", | ||
"conventional-changelog-cli": "^1.1.1", | ||
"conventional-github-releaser": "git://github.com/kazupon/conventional-github-releaser.git#fix/config", | ||
"conventional-github-releaser": "^1.1.3", | ||
"eslint": "^2.10.0", | ||
@@ -24,0 +24,0 @@ "eslint-config-vue": "^1.0.0", |
@@ -14,3 +14,3 @@ import { warn } from './util' | ||
export default function (Vue) { | ||
const { isArray, isObject } = Vue.util | ||
const { isObject } = Vue.util | ||
@@ -20,3 +20,3 @@ function parseArgs (...args) { | ||
if (args.length === 1) { | ||
if (isObject(args[0]) || isArray(args[0])) { | ||
if (isObject(args[0]) || Array.isArray(args[0])) { | ||
args = args[0] | ||
@@ -30,3 +30,3 @@ } else if (typeof args[0] === 'string') { | ||
} | ||
if (isObject(args[1]) || isArray(args[1])) { | ||
if (isObject(args[1]) || Array.isArray(args[1])) { | ||
args = args[1] | ||
@@ -33,0 +33,0 @@ } |
import util, { warn } from './util' | ||
import path from './path' | ||
import compare from './compare' | ||
import Asset from './asset' | ||
@@ -20,2 +19,4 @@ import Override from './override' | ||
function plugin (Vue, opts = {}) { | ||
const version = (Vue.version && Number(Vue.version.split('.')[0])) || -1 | ||
if (process.env.NODE_ENV !== 'production' && plugin.installed) { | ||
@@ -26,4 +27,3 @@ warn('already installed.') | ||
if (process.env.NODE_ENV !== 'production' | ||
&& (!Vue.version || compare(Vue.version, '1.0') < 0)) { | ||
if (process.env.NODE_ENV !== 'production' && version < 1) { | ||
warn('vue-i18n (' + plugin.version | ||
@@ -56,3 +56,3 @@ + ') need to use vue version 1.0 or later (vue version: ' | ||
plugin.version = '4.0.1' | ||
plugin.version = '4.1.0' | ||
@@ -59,0 +59,0 @@ export default plugin |
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
64972
15
1992