title: Where should I put general utility functions which will be used by multiple Vue.js components?
body: <p>Usually I create the function in the component which is gonna use the function, however, I'm starting to have the need to use a certain function in 2 or more components, which means that right now I would have to copy and place it in the other components. This is obviously less than optimal, so I am wondering where should I place those functions. To show you what I mean by general utility functions I'll add one here:</p>
  
  <pre><code>winrate(wins, losses) {
      let games = wins + losses
      return Math.round(wins * 100 / games) + '%'
  }
  </code></pre>
  
  <p>Nothing special, it just takes wins and losses and then returns win rate.</p>
  
  <p>I am using Vuex and realistically I could put them in the Vuex store, however, I'm not sure if that's the best option so this is why I'm asking you guys.</p>