src/common/helpers.js
/**
 * Finds a modules name by looking at its parent
 * @param  {object} state Vuex modules state
 * @return {String}       Module name
 */
Finds a modules name by looking at its parent
@param  {object} state Vuex modules state
@return {String}       Module name
Finds a modules name by looking at its parent @param { object } state Vuex modules state @return { String } Module name
function findModuleNameFromParent(state) {
  for (const prop in state.$parent) {
    if (state.$parent[prop] === state) {
      return prop;
    }
  }
}
function findModuleNameFromParent ( state ) { for ( const prop in state . $parent ) { if ( state . $parent [ prop ] === state ) { return prop ; } } }
Finds a modules name by looking at its parent
 @param  {object} state Vuex modules state
 @return {String}       Module name
Finds a modules name by looking at its parent @param { object } state Vuex modules state @return { String } Module name