what is the right way to use functions from js file? - Nuxt