https://github.com/akaustav/roman-number-utils
Utility methods to convert natural numbers to roman numbers and vice-versa.
https://github.com/akaustav/roman-number-utils
deno roman roman-numerals typescript
Last synced: 4 months ago
JSON representation
Utility methods to convert natural numbers to roman numbers and vice-versa.
- Host: GitHub
- URL: https://github.com/akaustav/roman-number-utils
- Owner: akaustav
- License: mit
- Created: 2020-07-06T03:45:26.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-09-20T03:07:23.000Z (almost 6 years ago)
- Last Synced: 2025-08-31T19:44:01.069Z (10 months ago)
- Topics: deno, roman, roman-numerals, typescript
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# roman-number-utils
Utility methods to convert natural numbers to roman numbers and vice-versa.
## Natural to Roman Number Example
```typescript
import { naturalToRoman } from 'https://deno.land/x/roman_number_utils@1.0.1/mod.ts';
const natural = 54;
const roman = naturalToRoman(natural);
console.log(roman); // expected output: LIV
```
## Roman to Natural Number Example
```typescript
import { romanToNatural } from 'https://deno.land/x/roman_number_utils@1.0.1/mod.ts';
const roman = 'MMXX';
const natural = romanToNatural(roman);
console.log(natural); // expected output: 2020
```
## Execute Examples
```shell
deno run https://deno.land/x/roman_number_utils/examples/example-natural-to-roman.ts
deno run https://deno.land/x/roman_number_utils/examples/example-roman-to-natural.ts
```
## License
The [MIT License](LICENSE)