1.2.0 • Published 6 years ago
dec2roman v1.2.0
dec2roman
Convert Roman numbers to decimal and back. Supports vinculum for numbers larger than 3999.
Demo at https://www.vperi.com/roman
Installation
Install with npm
$ npm install --save dec2roman
API
dec2Roman
Converts a {Number} into it's Roman equivalent.
Parameters
x
Number the number to be converted into Roman$1
Object (optional, default{}
)$1.mode
(optional, default'ibar'
)
Returns String The roman equivalent
roman2Dec
Returns the decimal representation of a given Roman number {String}
Parameters
str
{String} The roman number to be convertedstrict
Objectstrict.strict
(optional, defaultfalse
)
Returns Number the decimal equivalent
matchAll
Parameters
regex
{RegExp}sourceString
aggregator
Returns any