<commit_before>import { Module } from 'vuex'
import { RouteConfig, NavigationGuard } from 'vue-router'
import Vue from 'vue'
import merge from 'lodash-es/merge'
import some from 'lodash-es/some'
import find from 'lodash-es/find'
import rootStore from '@vue-storefront/store'
import { Logger } from '@vue-storefront/core/lib/logger'
import { setupMultistoreRoutes } from '..//multistore'
import { router } from '@vue-storefront/core/app'
import { isServer } from '@vue-storefront/core/helpers'
import { VSF, VueStorefrontModuleConfig } from './types'


const VSF: VSF = {
  Vue, 
  config: rootStore.state.config, 
  store: rootStore, 
  isServer
}

const moduleExtendings: VueStorefrontModuleConfig[] = []
const registeredModules: VueStorefrontModuleConfig[] = []

function extendModule(moduleConfig: VueStorefrontModuleConfig) {
  moduleExtendings.push(moduleConfig)
}

class VueStorefrontModule {
  private _isRegistered = false
  constructor (
    private _c: VueStorefrontModuleConfig,
  ) { }

  public get config () {
    return this._c
  }

  /** Use only if you want to explicitly modify module config. Otherwise it's much easier to use `extendModule` */
  public set config (config) {
    this._c = config
  }


  private static _doesStoreAlreadyExists (key: string) : boolean {
    let storeExists = false
    registeredModules.forEach(m => {
      if (m.store) {
        if (m.store.modules.some(m => m.key === key)) storeExists = true
      }
    })<commit_msg>minor ordering refactor<commit_after>import { Module } from 'vuex'
import { RouteConfig, NavigationGuard } from 'vue-router'
import Vue from 'vue'
import merge from 'lodash-es/merge'
import some from 'lodash-es/some'
import find from 'lodash-es/find'
import rootStore from '@vue-storefront/store'
import { Logger } from '@vue-storefront/core/lib/logger'
import { setupMultistoreRoutes } from '..//multistore'
import { router } from '@vue-storefront/core/app'
import { isServer } from '@vue-storefront/core/helpers'
import { VSF, VueStorefrontModuleConfig } from './types'

const moduleExtendings: VueStorefrontModuleConfig[] = []
const registeredModules: VueStorefrontModuleConfig[] = []
const VSF: VSF = {
  Vue, 
  config: rootStore.state.config, 
  store: rootStore, 
  isServer
}

function extendModule(moduleConfig: VueStorefrontModuleConfig) {
  moduleExtendings.push(moduleConfig)
}

class VueStorefrontModule {
  private _isRegistered = false
  constructor (
    private _c: VueStorefrontModuleConfig,
  ) { }

  public get config () {
    return this._c
  }

  /** Use only if you want to explicitly modify module config. Otherwise it's much easier to use `extendModule` */
  public set config (config) {
    this._c = config
  }


  private static _doesStoreAlreadyExists (key: string) : boolean {
    let storeExists = false
    registeredModules.forEach(m => {
      if (m.store) {
        if (m.store.modules.some(m => m.key === key)) storeExists = true
      }
    })
{'fraction_non_alphanumeric': 0.1103588354773189, 'fraction_numerical': 0.0, 'mean_word_length': 4.016977928692699, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1325143', 'n_tokens_mistral': 931, 'n_tokens_neox': 908, 'n_words': 250}