dist/vuex-i18n.es.js
function checkKeyExists(key) {
    var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fallback';
    // get the current language from the store
    var locale = store.state[moduleName].locale;
    var fallback = store.state[moduleName].fallback;
    var translations = store.state[moduleName].translations; // check the current translation

    if (translations.hasOwnProperty(locale) && translations[locale].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'strict') {
      return false;
    } // check any localized translations


    var localeRegional = locale.split('-');

    if (localeRegional.length > 1 && translations.hasOwnProperty(localeRegional[0]) && translations[localeRegional[0]].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'locale') {
      return false;
    } // check if a fallback locale exists


    if (translations.hasOwnProperty(fallback) && translations[fallback].hasOwnProperty(key)) {
      return true;
    } // key does not exist in the store


    return false;
  }
function checkKeyExists(key) {
    var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fallback';
    // get the current language from the store
    var locale = store.state[moduleName].locale;
    var fallback = store.state[moduleName].fallback;
    var translations = store.state[moduleName].translations; // check the current translation

    if (translations.hasOwnProperty(locale) && translations[locale].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'strict') {
      return false;
    } // check any localized translations


    var localeRegional = locale.split('-');

    if (localeRegional.length > 1 && translations.hasOwnProperty(localeRegional[0]) && translations[localeRegional[0]].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'locale') {
      return false;
    } // check if a fallback locale exists


    if (translations.hasOwnProperty(fallback) && translations[fallback].hasOwnProperty(key)) {
      return true;
    } // key does not exist in the store


    return false;
  }
function checkKeyExists ( key ) { var scope = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : 'fallback' ; // get the current language from the store var locale = store . state [ moduleName ] . locale ; var fallback = store . state [ moduleName ] . fallback ; var translations = store . state [ moduleName ] . translations ; // check the current translation if ( translations . hasOwnProperty ( locale ) && translations [ locale ] . hasOwnProperty ( key ) ) { return true ; } if ( scope == 'strict' ) { return false ; } // check any localized translations var localeRegional = locale . split ( '-' ) ; if ( localeRegional . length > 1 && translations . hasOwnProperty ( localeRegional [ 0 ] ) && translations [ localeRegional [ 0 ] ] . hasOwnProperty ( key ) ) { return true ; } if ( scope == 'locale' ) { return false ; } // check if a fallback locale exists if ( translations . hasOwnProperty ( fallback ) && translations [ fallback ] . hasOwnProperty ( key ) ) { return true ; } // key does not exist in the store return false ; }
check if the given key exists in the current locale
check if the given key exists in the current locale