An open API service indexing awesome lists of open source software.

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

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