Roman-decimal Converter
Install roman-decimal-converter locally via npm:
npm install roman-decimal-converterTesting
npm startconRomanDec
- 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