dec2roman

1.2.0 • Public • Published

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 converted
  • strict Object
    • strict.strict (optional, default false)

Returns Number the decimal equivalent

matchAll

Parameters

  • regex {RegExp}
  • sourceString
  • aggregator

Returns any

Readme

Keywords

none

Package Sidebar

Install

npm i dec2roman

Weekly Downloads

11

Version

1.2.0

License

MIT

Unpacked Size

33.9 kB

Total Files

23

Last publish

Collaborators

  • venkatperi