roman-number-utils

Utility methods to convert natural numbers to roman numbers and vice-versa.

Roman to Natural Number Example

import { romanToNatural } from 'https://deno.land/x/roman_number_utils@0.1.0/mod.ts';

const roman = 'MMXX';
const natural = romanToNatural(roman);

console.log(natural); // expected output: 2020

Natural to Roman Number Example

import { naturalToRoman } from 'https://deno.land/x/roman_number_utils@0.1.0/mod.ts';

const natural = 54;
const roman = naturalToRoman(natural);

console.log(roman); // expected output: LIV

License

The MIT License