{"id":16049873,"url":"https://github.com/codad5/currencynet","last_synced_at":"2025-03-17T21:31:15.365Z","repository":{"id":41360359,"uuid":"500615732","full_name":"codad5/currencynet","owner":"codad5","description":"This is an open-source lightweight javascript library that aid easy conversion of currency in a website across different client`s countries","archived":false,"fork":false,"pushed_at":"2022-10-14T09:43:03.000Z","size":504,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T04:47:14.006Z","etag":null,"topics":["currency","currency-converter","framework","javascript","lightweight"],"latest_commit_sha":null,"homepage":"https://codad5.github.io/currencynet/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codad5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-06T22:47:28.000Z","updated_at":"2023-05-03T12:58:21.000Z","dependencies_parsed_at":"2023-01-19T22:46:48.081Z","dependency_job_id":null,"html_url":"https://github.com/codad5/currencynet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fcurrencynet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fcurrencynet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fcurrencynet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fcurrencynet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codad5","download_url":"https://codeload.github.com/codad5/currencynet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885934,"owners_count":20363644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["currency","currency-converter","framework","javascript","lightweight"],"created_at":"2024-10-09T00:40:34.176Z","updated_at":"2025-03-17T21:31:15.096Z","avatar_url":"https://github.com/codad5.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿\r\n# CUURENCYNET\r\n\r\n\u003e Currencynet is a javascript light framework that helps to convert currency between different html tags\r\n\r\n\u003cbr/\u003e\r\n\r\n## Documentation : Usage\r\n\r\n\u003e For `react package` check out the [react-currencynet repo](https://github.com/codad5/react-currencynet)\r\n\r\n### Import Currencynet\r\n\r\n```html\r\n\u003cscript src=\"https://codad5.github.io/currencynet/main/v1.js\"\u003e\u003c/script\u003e\r\n```\r\n\r\n### Initialize Currencynet\r\n\r\n Create a new currencyNet Object\r\n\r\n```html\r\n    \u003cscript\u003e\r\n        window.addEventListener(\"load\", async () =\u003e {\r\n        // `NGN` this is our application build currency\r\n        const currencyChange = new currrencyNet('NGN', false);\r\n        await currencyChange.reWrite();\r\n        });\r\n    \u003c/script\u003e\r\n```\r\n\r\n`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\r\n\r\nNow add your the `currencynet-init` className to the desired element\r\n\r\n```html\r\n\u003cspan class=\"currencynet-init\"\u003e\u003c/span\u003e\r\n```\r\n\r\n### Declare your element Value(data)\r\n\r\n```html\r\n\u003cspan class=\"currencynet-init\" data-currencynet-value=\"345\"\u003e\u003c/span\u003e\r\n```\r\n\r\n###### You can also set (change) the currency data for a particular element\r\n\r\n\u003e This is important if you want to show the difference between two currency\r\n\r\n\u003e For this example i have changing the currency to `India rupee`\r\n\r\n```html\r\n\u003cspan class=\"currencynet-init-inr\" data-currencynet-value=\"345\"\u003e\u003c/span\u003e\r\n```\r\n\r\n### Adding a dropdown option\r\n\r\n```html\r\n\u003cselect class=\"currencynet-select\"\u003e\r\n    \u003coption name=\"USD\" id=\"\"\u003eUSD\u003c/option\u003e\r\n    \u003coption name=\"NGN\" id=\"\"\u003eNGN\u003c/option\u003e\r\n    \u003coption name=\"EUR\" id=\"\"\u003eEUR\u003c/option\u003e\r\n    \u003coption name=\"INR\" id=\"\"\u003eINR\u003c/option\u003e\r\n\u003c/select\u003e\r\n```\r\n\r\n\u003e NOTE: use the className `currencynet-select` for the drop down menu\r\n\r\n### changing the data type of your output\r\n\r\nYou can change the data type of your output from `float` to `int` by adding this few code at the bottom of your html code\r\n\r\n###### To return a float data type\r\n\r\n```html\r\n\u003c/body\u003e\r\n\u003cscript\u003e\r\n    // this will make the output a float of 2 decimal plcae `2.00` on true else a Integer `2` \r\n    currencyChange.float(true); \r\n    \r\n\u003c/script\u003e\r\n```\r\n\r\n- `float` method : this will make the output a float of 2 decimal plcae `2.00` on true else a Integer `2`\r\n\r\n### Table for all avaliable currency class\r\n\r\n| COUNTRY | ISO 4217 CODE | CLASSNAME |\r\n| :---: | :---:| :---|\r\n|Your Build Country | NULL | currencynet-init |\r\n| US Dollar | USD | currencynet-init-usd |\r\n| Indian Rupee | INR | currencynet-init-inr |\r\n| Euro  | EUR | currencynet-init-eur |\r\n| Chinese Yuan | CYN | currencynet-init-cyn |\r\n| Nigerian Naira| NGN | currencynet-init-ngn |\r\n\r\nmore are avaliable at [our documentation](https://codad5.github.io/currencynet/#country_table)\r\n\r\n#### TODO\r\n\r\n- [ ] Making a google web crawler to make the application use it own personal currency converter\r\n- [x] Fix Documentation UI\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodad5%2Fcurrencynet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodad5%2Fcurrencynet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodad5%2Fcurrencynet/lists"}