1.0.1 • Published 7 years ago

roman-numeral-to-decimal v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

Roman numeral converter

This is a simple module that takes a single string input that represents a Roman numeral and returns the decimal equivalent number.

Install

$ npm install roman-numeral-to-decimal

Usage

Simply pass in a String of Roman numerals and see the decimal number returned! If invalid input is passed into the first argument the function will return -1. Subsequent arguments passed into the function will be ignored/unused.

const romanNumeralToDecimal = require('roman-numeral-to-decimal');

romanNumeralToDecimal('MCMLXXXVII') // returns the number 1987

Test

In order to run the unit tests testing the module simply enter the command below when in the root of the repository:

$ npm test
1.0.1

7 years ago

1.0.0

7 years ago