Convert a valid romna numeral to its deciaml equivalent (1 - 3999)
$ npm install --save roman-to-decimal-converter
To use:
const generator = require('roman-to-decimal-converter');
generator(3999);
- If the roman numeral is not valid accoring to the regex - ^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$ - it will throw:
new TypeError('not a valid numeral');
Martin Bolton MacDonald
Copyright © 2019, Martin Bolton MacDonald. Released under the MIT License.