Simple currency converter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Christoph Miksche 889f4ffafe publish 6 months ago
public publish 6 months ago
src publish 6 months ago
.browserslistrc init 7 months ago
.eslintrc.js init 7 months ago
.gitignore init 7 months ago
LICENSE publish 6 months ago
README.md publish 6 months ago
babel.config.js init 7 months ago
jest.config.js publish 6 months ago
package-lock.json publish 6 months ago
package.json publish 6 months ago
tsconfig.json publish 6 months ago
vue.config.js publish 6 months ago

README.md

currency_converter

Simple currency converter written in Vue.js

Features:

  • Convert between the following currencies:
    • EUR
    • USD
    • CHF
    • GBP
    • JPY
    • CAD
  • Use the following fixed rates:
    • EUR to USD: 1,1956
    • EUR to CHF: 1,1689
    • EUR to GBP: 0,8848
    • USD to JPY: 111,4500
    • CHF to USD: 1,0223
    • GBP to CAD: 1,6933
  • Alternatively use the https://exchangeratesapi.io/ which gets the exchange rates from the European Central Bank

Notes:

  • Input value is in american format
  • Output value is in german + selected currency format
  • The “fixed rates” mode is restricted on the given pairs. Other pairs could be calculated using the different pairs but it wasn’t specified so this program does nothing.

Why Vue.js?

I haven’t used Vue.js for more than one year. Angular is much more familiar to me, but Vue.js is small and should offer all the features this project needs (Angular would be overkill for such a little project). Also, with TypeScript bindings Vue.js shouldn’t feel like a big distance from Angular.

Why TypeScript?

Because this project will work with numbers and false interpretations of a number could lead to really big problems. I also don’t want to call “parseFloat()” on every number. TypeScript adds a extra layer of security.

Why RxJS?

Reactive extensions are a common way to work with async data in various programming languages. There are several libraries for languages like Java, JavaScript, PHP, Python, ... The project is really big, many developers know how to work with it - so it’s a good tested library. Because we work with exchange rates, which can change every second, we have to update the data in a aync way and here RxJS comes in.

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your unit tests

npm run test

Lints and fixes files

npm run lint