A high-precision TypeScript utility for converting integers into Roman numerals. Unlike standard converters, Romanify supports the Vinculum system (overline notation), allowing it to accurately represent numbers far exceeding the traditional 3,999 limit.
- Extended Range: Supports numbers from 1 to 3,999,999 using proper Unicode overline characters.
- Type Safety: Built entirely with TypeScript for robust type checking and IDE autocompletion.
- Lightweight: Zero external dependencies, ensuring a minimal footprint in your project.
- Input Validation: Includes built-in checks to ensure values are positive integers.
Follow these steps to set up the project locally for development or integration:
-
Clone the Repository
git clone git@github.com:Charmingdc/Romanify
-
Navigate to the Directory
cd Romanify -
Install Dependencies
npm install
-
Build the Project
npm run build
You can import the romanize function directly into your TypeScript or JavaScript project.
import { romanize } from "@charmingdc/romanify";
// Standard conversion
console.log(romanize(2024)); // Output: MMXXIV
// Large number conversion (using vinculum)
console.log(romanize(5000)); // Output: V̅
// Complex large numbers
console.log(romanize(4500)); // Output: I̅V̅DTo ensure the conversion logic remains accurate across all numeral mappings:
npm test| Technology | Purpose | Link |
|---|---|---|
| TypeScript | Language & Type Safety | typescriptlang.org |
| Node.js | Runtime Environment | nodejs.org |
| NPM | Package Management | npmjs.com |
Contributions are welcome to help improve the logic or performance of the converter.
- 🍴 Fork the repository.
- 🌿 Create a new branch for your feature or bug fix.
- 🧪 Ensure all tests pass before submitting a pull request.
- 📝 Document any changes in the function signatures.
This project is licensed under the MIT License - see the LICENSE file for details.
Adebayo Muis (Charming Dc)
- GitHub: Charmingdc
- Twitter/X: @Charmingdc01
- LinkedIn: Adebayo Muis