@charmingdc/romanify
v1.0.0
Published
Convert numbers to Roman numerals, including large numbers using overlines (supports numbers > 3999)
Maintainers
Readme
Romanify 🏛️
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.
Features
- 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.
Installation
Follow these steps to set up the project locally for development or integration:
Clone the Repository
git clone [email protected]:Charmingdc/RomanifyNavigate to the Directory
cd RomanifyInstall Dependencies
npm installBuild the Project
npm run build
Usage
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̅DRunning Tests
To ensure the conversion logic remains accurate across all numeral mappings:
npm testTechnologies Used
| Technology | Purpose | Link | | ---------- | ---------------------- | ----------------------------------------------------- | | TypeScript | Language & Type Safety | typescriptlang.org | | Node.js | Runtime Environment | nodejs.org | | NPM | Package Management | npmjs.com |
Contributing
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.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author Info
Adebayo Muis (Charming Dc)
- GitHub: Charmingdc
- Twitter/X: @Charmingdc01
- LinkedIn: Adebayo Muis
