Skip to content

Martin-MacDonald/roman-to-decimal-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published