Convert Roman numbers to decimal and back. Supports vinculum for numbers larger than 3999.
Demo at https://www.vperi.com/roman
$ npm install --save dec2roman
Converts a {Number} into it's Roman equivalent.
-
x
Number the number to be converted into Roman -
$1
Object (optional, default{}
)-
$1.mode
(optional, default'ibar'
)
-
Returns String The roman equivalent
Returns the decimal representation of a given Roman number {String}
-
str
{String} The roman number to be converted -
strict
Object-
strict.strict
(optional, defaultfalse
)
-
Returns Number the decimal equivalent
-
regex
{RegExp} sourceString
aggregator
Returns any