convert-to-roman

1.5.0 • Public • Published

Convert to Roman

Convert decimal to roman numerals and vice versa

Features

  • Roman to decimal
  • Decimal to Roman
  • Loop through roman numerals
  • Easy implementation

Installation

Install my-project with npm

  npm install convert-to-roman

Usage/Examples

const convert = require('convert-to-roman')

var decimal = convert.toDecimal("DCLVII")
console.log(decimal);
// output 657


var roman = convert.toRoman(2023)
console.log(roman);
// output MMXXIII


convert.loop(10,50,5)
    // 10 = start value
    // 50 = end value
    // 5 = increment value
// output X XV XX XXV XXX XXXV XL XLV L

Package Sidebar

Install

npm i convert-to-roman

Weekly Downloads

9

Version

1.5.0

License

ISC

Unpacked Size

3.11 kB

Total Files

3

Last publish

Collaborators

  • richardshaju