Convert literal roman number to decimal number
🏠 Homepage
npm install cadena-romano-a-decimal
First, import module:
const numRomanoAdecimal = require('cadena-romano-a-decimal');
Then you can use the convert function in your app:
const romanString = 'XXI';
const valueDecimal = numRomanoAdecimal(romanString);
if (valueDecimal !== -1) {
console.log(`${romanString} is ${valueDecimal}`);
} else {
console.log(`Invalid roman literal!!`);
}
👤 Ivan Chinea
- Github: @chitenavi
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 Ivan Chinea.
This project is MIT licensed.