This package has been deprecated

Author message:

No longer maintained.

ecb-currency-converter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

ecb-currency-converter

Build Status Convert currencies using data from the European Central Bank.

Installation

With npm

npm install --save ecb-currency-converter

Documentation

Documentation is available here.

Example

Example of currency conversion

import {CurrencyConverter} from "../src";

// Create converter
let currencyConverter: CurrencyConverter = new CurrencyConverter();

currencyConverter

    // Convert from EUR to SEK
    .convert({
        from: "EUR",
        to: "SEK",
        quantity: 100
    })

    // Get results
    .then(result => {
        /*
         * Result is for example
         * {
         *     currency: 'SEK',
         *     quantity: 1019.22759
         * }
         */
    });

Contribute

Make sure to run the tests

npm test

/ecb-currency-converter/

    Package Sidebar

    Install

    npm i ecb-currency-converter

    Weekly Downloads

    2

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    29.2 kB

    Total Files

    15

    Last publish

    Collaborators

    • flaremind