1.2.0 • Published 5 months ago

@tushar_rayamajhi/roman_converter v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

��# Roman Numeral Converter

A lightweight utility for converting between integers and Roman numerals, with validation support.

Installation

Import the module in your JavaScript project:

import converter from './roman-converter.js';

console.log(converter.IntToRoman(2023)); // Output: "MMXXIII"
console.log(converter.IntToRoman(3999)); // Output: "MMMCMXCIX"


console.log(converter.romanToInt("LVIII")); // Output: 58
console.log(converter.romanToInt("MCMXCIV")); // Output: 1994


console.log(converter.isValidRoman("XII")); // true
console.log(converter.isValidRoman("IIII")); // false (Use IV instead)


console.log(converter.isValidInteger(0)); // false
console.log(converter.isValidInteger(42.5)); // false
console.log(converter.isValidInteger(3000)); // true
1.2.0

5 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago