1.2.0 ⢠Published 5 months ago
@scottobert/roman-numerals v1.2.0
Utility functions for converting integers to roman numerals and vice versa.
š Homepage
Install
npm install @scottobert/roman-numeralsRun tests
npm run testUsage
import { romanToInt, intToRoman } from "@scottobert/roman-numerals";
console.log(romanToInt("MCMXCIV")); // 1994
console.log(intToRoman(1994)); // MCMXCIVNew Feature: Validate Roman Numeral Strings
Check if a string is a valid Roman numeral. This can be useful for input validation before conversion.
Example
import { isValidRoman } from "@scottobert/roman-numerals";
console.log(isValidRoman("MCMXCIV")); // true
console.log(isValidRoman("INVALID")); // falseAuthor
š¤ Scott Obert
- GitHub: @scottobert
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2022 Scott Obert. This project is GPL--2.0 licensed.
This README was generated with ā¤ļø by readme-md-generator