1.0.0 • Published 5 years ago
roman-to-decimal-converter v1.0.0
Roman To Decimal Converter
Convert a valid romna numeral to its deciaml equivalent (1 - 3999)
Usage
$ npm install --save roman-to-decimal-converter
To use:
const generator = require('roman-to-decimal-converter');
generator(3999);
Errors
- 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');
Author
Martin Bolton MacDonald
Licence
Copyright © 2019, Martin Bolton MacDonald. Released under the MIT License.
1.0.0
5 years ago