{"id":16212249,"url":"https://github.com/driaug/current-currency","last_synced_at":"2025-10-29T02:42:52.222Z","repository":{"id":51365563,"uuid":"337492344","full_name":"driaug/current-currency","owner":"driaug","description":"Making it easy to work with currencies and cryptos!","archived":false,"fork":false,"pushed_at":"2021-04-19T14:55:13.000Z","size":137,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T17:46:45.239Z","etag":null,"topics":["currency","iso-currency","npm","rates","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/current-currency","language":"TypeScript","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/driaug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["driaug"]}},"created_at":"2021-02-09T18:04:30.000Z","updated_at":"2024-08-01T23:25:45.000Z","dependencies_parsed_at":"2022-08-28T03:20:27.588Z","dependency_job_id":null,"html_url":"https://github.com/driaug/current-currency","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/driaug%2Fcurrent-currency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driaug%2Fcurrent-currency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driaug%2Fcurrent-currency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driaug%2Fcurrent-currency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/driaug","download_url":"https://codeload.github.com/driaug/current-currency/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982141,"owners_count":20378605,"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","iso-currency","npm","rates","typescript"],"created_at":"2024-10-10T10:51:21.302Z","updated_at":"2025-10-29T02:42:47.171Z","avatar_url":"https://github.com/driaug.png","language":"TypeScript","funding_links":["https://github.com/sponsors/driaug"],"categories":[],"sub_categories":[],"readme":"# current-currency 💵💶💷\nMaking it easy to work with currencies and cryptos! \n\n## Summary\n- [Getting Started](#getting-started)\n- [Available functions](#Available-functions)\n- [Supported currencies](#Supported-currencies)\n- [Supported cryptocurrencies](#Supported-cryptocurrencies)\n\n## Getting Started\nInstall current-currency with your favourite package manager.\n- `npm install current-currency`\n- `yarn add current-currency`\n\n## Available functions\n### convert\nConvert is used to get the current rates of a currency.\n#### Example\n```ts\nimport { convert } from \"current-currency\";\n\nconvert(\"EUR\", 10.2, \"USD\").then(res =\u003e console.log(res));\n// {currency: \"USD\", amount: 12.35}\n```\nIn the background we make use of https://exchangeratesapi.io/ to always have the current rates.\n\n### addSymbol\nAddSymbol is used to add the right currency symbol in the right position using the ISO currency code.\n#### Example\n```ts\nimport { addSymbol } from \"current-currency\";\n\nconst symbolized = addSymbol(\"RUB\", 10.2);\nconsole.log(symbolized);\n// ₽10.2\n```\n\n#### Example with force position\n```ts\nimport { addSymbol } from \"current-currency\";\n\nconst symbolized = addSymbol(\"USD\", 10.2, \"post\");\nconsole.log(symbolized);\n// 10.2$\n```\n### extract\nExtract is used to retrieve information about a currency using the ISO currency code.\n#### Example\n```ts\nimport { extract } from \"current-currency\";\n\nconst extraction = extract(\"10.2RUB\");\nconsole.log(extraction);\n// { type: \"currency\", name: \"Russian ruble\", symbol: \"₽\", decimal: \",\", position: \"pre\" }\n```\n\n## Supported currencies\n| Code | Name                 |\n|------|----------------------|\n| EUR  | Euro                 |\n| USD  | United States Dollar |\n| CAD  | Canadian Dollar      |\n| HKD  | Hong Kong Dollar     |\n| ISK  | Icelandic Króna      |\n| PHP  | Philippine Peso      |\n| DDK  | Danish Krone         |\n| HUF  | Hungarian Forint     |\n| CZK  | Czech Koruna         |\n| AUD  | Australian Dollar    |\n| RON  | Romanian Leu         |\n| SEK  | Swedish Krona        |\n| IDR  | Indonesian Rupiah    |\n| INR  | Indian Rupee         |\n| BRL  | Brazilian Real       |\n| RUB  | Russian Ruble        |\n| HRK  | Croatian Kuna        |\n| JPY  | Japanse Yen          |\n| TBH  | Thai Baht            |\n| CHF  | Swiss Franc          |\n| SGD  | Singapore Dollar     |\n| PLN  | Polish złoty         |\n| BGN  | Bulgarian Lev        |\n| TRY  | Turkish Lira         |\n| CNY  | Chinese Renminbi     |\n| NOK  | Norwegian Krone      |\n| NZD  | New Zealand Dollar   |\n| ZAR  | South African Rand   |\n| MXN  | Mexican Peso         |\n| ILS  | Israeli Shekel       |\n| GBP  | Pound Sterling       |\n| KRW  | South Korean Won     |\n| MYR  | Malaysian Ringgit    | \n\n## Supported cryptocurrencies\n| Code | Name                 |\n|------|----------------------|\n| BTC  | Bitcoin              |\n| ETH  | Ethereum             |\n| LTC  | Litecoin             |\n| XRP  | Ripple               |\n| DOGE | Dogecoin             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriaug%2Fcurrent-currency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdriaug%2Fcurrent-currency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriaug%2Fcurrent-currency/lists"}