Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zozs/curc
Currency converter written in Node.js. Uses fixer.io for exchange rates.
https://github.com/zozs/curc
Last synced: 7 days ago
JSON representation
Currency converter written in Node.js. Uses fixer.io for exchange rates.
- Host: GitHub
- URL: https://github.com/zozs/curc
- Owner: zozs
- License: isc
- Created: 2018-08-18T19:47:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T22:39:24.000Z (over 3 years ago)
- Last Synced: 2024-05-02T06:15:55.479Z (8 months ago)
- Language: JavaScript
- Size: 302 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
curc
====Currency converter written in Node.js. Uses fixer.io for exchange rates.
## Installation
`npm i` as usual.
## Configuration
Since fixer.io is used for exchange rates, registration is required to get API key, which is then added to the `.env` file.
See `.env.example` for an example. The default destination currency can be changed as well.
## Usage
Example input/output. Default destination currency is SEK. By writing the amount enclosed in parentheses,
arbitrary expressions can be evaluated before doing the currency conversion.```
curc> 11.99eur
11.99 EUR =>
125.70 SEKcurc> 10usd
10.00 USD =>
91.58 SEKcurc> ((5+4.5)/2)eur
4.75 EUR =>
51.00 SEKcurc> 30sek usd
30.00 SEK =>
3.28 USDcurc> 40eur sek usd
40.00 EUR =>
419.36 SEK
45.79 USD
```## License
```
Copyright 2018, 2019, Linus KarlssonPermission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```