1.2.3 • Published 1 year ago

typescript-roman-numbers-converter v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NPM

Typescript Roman Numbers Converter

NPM

A simple and easy to use Typescript package that converts a given arabic number to roman number format

Installation

How to use it

First of all import the package:

toRoman

Converts the given number into a string that represents the same value in roman notation. Due to limitations, we cannot convert decimal numbers, numbers below 1 and numbers bigger than 3999.

toArabic

Converts the given string into a number that represents the same value in arabic notation.

isRoman

Returns true if the given string is a valid written roman number

RomanNumber class

Is the class that holds the value of the roman numeral

toRomanLarge, toRomanLargeStr

toRomanLarge converts the arab number passed as parameter to an instance of RomanNumber class. With this method we can convert numbers bigger than 3999. The string representation of the converted number wraps the thousands with an underscore and round braces. toRomanLargeStr is returns the value of str after calling toRomanLarge.

1.2.3

1 year ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago