-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from MFM-347/dev
Added prettier, and update README #98
- Loading branch information
Showing
57 changed files
with
2,076 additions
and
1,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 12 | ||
}, | ||
"rules": { | ||
"no-unused-vars" :"off", | ||
"no-constant-condition":"off", | ||
"semi":"error", | ||
"quotes": ["error", "double"] | ||
} | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 12 | ||
}, | ||
"rules": { | ||
"no-unused-vars": "off", | ||
"no-constant-condition": "off", | ||
"semi": "error", | ||
"quotes": ["error", "double"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
name: lint javascript projects | ||
|
||
on: | ||
pull_request: | ||
branches: [ master] | ||
|
||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
lint_pull_request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.15.0 | ||
- run: npm ci | ||
- run: npm run lint | ||
lint_pull_request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.15.0 | ||
- run: npm ci | ||
- run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
/**/**/*.DS_Store | ||
/**/**/node_modules | ||
/**/**/.env | ||
/**/**/*.env | ||
/**/**/*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
# Currency converter | ||
|
||
This web app is exclusively made for converting different currency rates in a most simple | ||
and efficient manner. The best part of this web app is that it converts to current and live | ||
rates from one another which keeps you up-to-date with the current exchange rates. It | ||
supports up to 52 different currency rates from all over the globe. | ||
It fetches live exchange rates from an API from the website exchangerate-api.com and | ||
This web app is exclusively made for converting different currency rates in a most simple | ||
and efficient manner. The best part of this web app is that it converts to current and live | ||
rates from one another which keeps you up-to-date with the current exchange rates. It | ||
supports up to 52 different currency rates from all over the globe. | ||
|
||
It fetches live exchange rates from an API from the website exchangerate-api.com and | ||
use it here. | ||
|
||
# How do I use it? 👀🤨 | ||
|
||
For using it, First you have to select the currency from which you want to exchange. For | ||
this you have to choose from "From:" section your desired currency and then select the | ||
currency in which you want to exchange from "To:" section. Then enter the amount of | ||
currency you want to exchange in "Amount:" section and finally click on "Convert" option. | ||
Firstly it will show the current or live rate of 1 unit of that currency to other and then it | ||
will display the exchange rate of the total amount you have entered. | ||
|
||
|
||
For using it, First you have to select the currency from which you want to exchange. For | ||
this you have to choose from "From:" section your desired currency and then select the | ||
currency in which you want to exchange from "To:" section. Then enter the amount of | ||
currency you want to exchange in "Amount:" section and finally click on "Convert" option. | ||
Firstly it will show the current or live rate of 1 unit of that currency to other and then it | ||
will display the exchange rate of the total amount you have entered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
const conv = document.getElementById("btn"); | ||
conv.addEventListener("click" ,()=>{ | ||
const from = document.getElementById("from_currency").value; | ||
const to_curr = document.getElementById("to_currency").value; | ||
const amount = document.getElementById("amount").value; | ||
fetch(`https://api.exchangerate-api.com/v4/latest/${from}`) | ||
.then(res => res.json()) | ||
.then(res => { | ||
let rate = res.rates[to_curr]; | ||
var final_amount = amount*rate; | ||
document.getElementById("result").innerText = `1 ${from} = ${rate} ${to_curr} | ||
${amount} ${from} = ${final_amount} ${to_curr}`; | ||
}); | ||
|
||
|
||
}); | ||
const conv = document.getElementById('btn') | ||
conv.addEventListener('click', () => { | ||
const from = document.getElementById('from_currency').value | ||
const to_curr = document.getElementById('to_currency').value | ||
const amount = document.getElementById('amount').value | ||
fetch(`https://api.exchangerate-api.com/v4/latest/${from}`) | ||
.then((res) => res.json()) | ||
.then((res) => { | ||
let rate = res.rates[to_curr] | ||
var final_amount = amount * rate | ||
document.getElementById('result').innerText = `1 ${from} = ${rate} ${to_curr} | ||
${amount} ${from} = ${final_amount} ${to_curr}` | ||
}) | ||
}) |
Oops, something went wrong.