zoltantothcom / vanilla-js-currency-converter

Vanilla JavaScript (ES2015) currency converter widget.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vanilla JavaScript Currency Converter

Vanilla JavaScript (ES2015) currency converter widget using Fixer data.

Demo

CURRENCY CONVERTER

Usage

Copy the dist/converter.js file into your project and then:

import CurrencyConverter from './converter';

const converter = new CurrencyConverter({
    container: 'my-container-element',
    widgetTitle: 'ES2015 Currency Converter'
});

Options

Option Type Default Description
container string converter HTML id of the converter container in the HTML markup.
widgetTitle string Currency Converter The widget title to show on page.
showDisclaimer boolean true Display the disclaimer section under the converter.
currencyList array ['USD', 'EUR', 'JPY', 'GBP', 'CHF'] List of currencies for the widget. Possible values are: AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HRK, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, RUB, SEK, SGD, THB, TRY, USD, ZAR

Running locally

  1. Clone the project repository and install the dependencies

    $ git clone https://github.com/zoltantothcom/vanilla-js-currency-converter.git
    $ cd vanilla-js-currency-converter
    $ npm install
  2. Start the development server, open http://localhost:3000 and start fiddling around

    $ npm start
  3. Done!

About

Vanilla JavaScript (ES2015) currency converter widget.

License:The Unlicense


Languages

Language:JavaScript 90.0%Language:CSS 8.3%Language:HTML 1.7%