/node-cbar

Cbar.az Nodejs wrapper

Primary LanguageTypeScript

Node CBAR Currency Converter

License Node.js npm CodeQL

Description

A simple Node.js module for converting currencies using Cbar.az data.

Installation

npm install node-cbar

Usage

const { CBAR, CurrencyTypes } = require('node-cbar');

const cl = new CBAR();
cl.convert({ amount: 2, currencyType:CurrencyTypes.USD}).then((result) => {
    console.log(result);
});

Options

  • logErrors: Enable logging errors (default: false)
  • baseURL: Base URL for CBAR data (default: https://www.cbar.az/currencies/)
  • date: Date String for URL

License

This project is licensed under the ISC License - see the LICENSE.md file for details.