https://github.com/codad5/currencynet
This is an open-source lightweight javascript library that aid easy conversion of currency in a website across different client`s countries
https://github.com/codad5/currencynet
currency currency-converter framework javascript lightweight
Last synced: 12 months ago
JSON representation
This is an open-source lightweight javascript library that aid easy conversion of currency in a website across different client`s countries
- Host: GitHub
- URL: https://github.com/codad5/currencynet
- Owner: codad5
- Created: 2022-06-06T22:47:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T09:43:03.000Z (over 3 years ago)
- Last Synced: 2025-02-28T04:47:14.006Z (about 1 year ago)
- Topics: currency, currency-converter, framework, javascript, lightweight
- Language: JavaScript
- Homepage: https://codad5.github.io/currencynet/
- Size: 492 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CUURENCYNET
> Currencynet is a javascript light framework that helps to convert currency between different html tags
## Documentation : Usage
> For `react package` check out the [react-currencynet repo](https://github.com/codad5/react-currencynet)
### Import Currencynet
```html
```
### Initialize Currencynet
Create a new currencyNet Object
```html
window.addEventListener("load", async () => {
// `NGN` this is our application build currency
const currencyChange = new currrencyNet('NGN', false);
await currencyChange.reWrite();
});
```
`NGN` - This can be replaced by any of [ISO 4217 CODE](https://en.wikipedia.org/wiki/ISO_4217) based on the currency used in building your application
Now add your the `currencynet-init` className to the desired element
```html
```
### Declare your element Value(data)
```html
```
###### You can also set (change) the currency data for a particular element
> This is important if you want to show the difference between two currency
> For this example i have changing the currency to `India rupee`
```html
```
### Adding a dropdown option
```html
USD
NGN
EUR
INR
```
> NOTE: use the className `currencynet-select` for the drop down menu
### changing the data type of your output
You can change the data type of your output from `float` to `int` by adding this few code at the bottom of your html code
###### To return a float data type
```html