1.0.0 • Published 5 years ago

@rabelsan/roman-decimal-converter v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Roman-decimal Converter

Install roman-decimal-converter locally via npm:

npm install roman-decimal-converter

Testing

npm start

conRomanDec

  • Converts an integer number to Roman format
const conversor = require('@rabelsan/roman-decimal-converter');

let result = null; 
let romanNbr = '';

romanNbr = 'xxi'; 
result = conversor.convertRomanToDecimal(romanNbr);
if (result.isOk) {
    console.log(romanNbr,': ',result.result);
} else {
    console.log(result.error);
}

conDecRoman

  • Converts a Roman number to decimal format
const conversor = require('@rabelsan/roman-decimal-converter');

let result = null; 
let decNbr = 0;
result = conversor.convertDecimalToRoman(decNbr);
if (result.isOk) {
    console.log(decNbr, ': ', result.result);
} else {
    console.log(result.error);
}

@rabelsan

1.0.0

5 years ago