ch7al

1.0.11 • Public • Published

ch7al

Build Status Dependency Status Coverage Status

ch7al is released under the MIT license

Description

Moroccan Local Currency Converter, convert Dirham to Centimes, Rials & vice versa.

Installation

$ npm i --save ch7al

Example

In Node.js:

const Ch7al = require('ch7al')
 
const dh = new Ch7al( 1, 'dh' )
const rial = new Ch7al( 1, 'rial' )
const centime = new Ch7al( 5, 'centime' )
 
console.log(`
  - 1 Dh = ${dh.to('rial')} rials = ${dh.to('centime')} centimes
  - 1 rials = ${rial.to('centime')} centimes = ${rial.to('dh')} Dh
  - 5 centimes = ${centime.to('rial')} rials = ${centime.to('dh')} Dh
`)
 
/*
- 1 Dh = 20 rials = 100 centimes
- 1 rials = 5 centimes = 0.05 Dh
- 5 centimes = 1 rials = 0.05 Dh
*/

Package Sidebar

Install

npm i ch7al

Weekly Downloads

10

Version

1.0.11

License

MIT

Last publish

Collaborators

  • ysnksy