Installations
npm install ecb-euro-exchange-rates
Score
87.9
Supply Chain
97.9
Quality
76.7
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Developer
qqilihq
Developer Guide
Module System
CommonJS
Min. Node Version
>=18
Typescript Support
Yes
Node Version
18.19.0
NPM Version
10.2.3
Statistics
19 Stars
133 Commits
3 Forks
3 Watching
1 Branches
1 Contributors
Updated on 22 Nov 2024
Bundle Size
28.33 kB
Minified
9.06 kB
Minified + Gzipped
Languages
JavaScript (57.88%)
TypeScript (41.27%)
Shell (0.85%)
Total Downloads
Cumulative downloads
Total Downloads
696,362
Last day
29.8%
2,446
Compared to previous day
Last week
12.6%
11,390
Compared to previous week
Last month
65.3%
33,187
Compared to previous month
Last year
98%
248,040
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Euro Exchange Rates by ECB
Retrieve Euro foreign exchange reference rates from an API provided by the European Central Bank. This module is intended to run on the server via Node.js, not in the browser.
The API provides exchange rates updated daily for the following currencies:
- USD: US dollar
- JPY: Japanese yen
- BGN: Bulgarian lev
- CZK: Czech koruna
- DKK: Danish krone
- GBP: Pound sterling
- HUF: Hungarian forint
- PLN: Polish zloty
- RON: Romanian leu
- SEK: Swedish krona
- CHF: Swiss franc
- ISK: Icelandic krona
- NOK: Norwegian krone
- HRK: Croatian kuna
- RUB: Russian rouble
- TRY: Turkish lira
- AUD: Australian dollar
- BRL: Brazilian real
- CAD: Canadian dollar
- CNY: Chinese yuan renminbi
- HKD: Hong Kong dollar
- IDR: Indonesian rupiah
- ILS: Israeli shekel
- INR: Indian rupee
- KRW: South Korean won
- MXN: Mexican peso
- MYR: Malaysian ringgit
- NZD: New Zealand dollar
- PHP: Philippine piso
- SGD: Singapore dollar
- THB: Thai baht
- ZAR: South African rand
Installation
1$ yarn add ecb-euro-exchange-rates
Usage
TS typings are available and you’ll get auto-completion for the supported currencies.
1import * as exchangeRates from 'ecb-euro-exchange-rates'; 2 3const result = await exchangeRates.fetch(); 4console.log('Last update: ' + result.time); 5console.log('USD: ' + result.rates.USD);
Historic rates are available via fetchHistoric90d
(fetches previous 90 days) and fetchHistoric
(fetches all rates back to 1999).
Development
Use Volta.
Install NPM dependencies with yarn
.
To execute the tests, run yarn test
.
For the best development experience, make sure that your editor supports ESLint and EditorConfig.
Linting of code and commit message happens on commit via Husky.
Releasing to NPM
Commit all changes and run the following:
1$ npm login 2$ yarn version --<update_type> 3$ npm publish
… where <update_type>
is one of patch
, minor
, or major
. This will update the package.json
, and create a tagged Git commit with the version number.
Contributing
Pull requests are very welcome. Feel free to discuss bugs or new features by opening a new issue.
Copyright Philipp Katz, LineUpr GmbH, 2018 – 2024
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/qqilihq/ecb-euro-exchange-rates/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/qqilihq/ecb-euro-exchange-rates/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/qqilihq/ecb-euro-exchange-rates/main.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:20
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 20 are checked with a SAST tool
Score
3.3
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More