
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
roman-utils
Advanced tools
A lightweight and flexible TypeScript utility for converting between Roman numerals and integers. Easily convert numbers in both directions while optionally tracking conversion history.
npm install roman-utils
Or with Yarn:
yarn add roman-utils
import { RomanUtils } from 'roman-utils';
const utils = new RomanUtils(true); //
true
enables history recording// Integer to Roman const result1 = utils.parse(1999); console.log(result1); // { direction: 'intToRoman', romanNumber: 'MCMXCIX', intNumber: 1999 }
// Roman to Integer const result2 = utils.parse('XLII'); console.log(result2); // { direction: 'romanToInt', romanNumber: 'XLII', intNumber: 42 }
// Access conversion history console.log(utils.record);
// Clear history utils.clearHistory();
new RomanUtils(keepRecord: boolean = true)
Creates an instance of the converter.
keepRecord
(optional): Whether to keep a history of conversions.parse(input: string | number): RomanConversionRecord
Parses either a Roman numeral (as a string) or an integer (as a number) and returns a conversion record.
clearHistory(): void
Clears the internal history record.
record: RomanConversionRecord[]
An array of all previous conversions (if history is enabled).
type ConversionDirection = 'romanToInt' | 'intToRoman';
type RomanConversionRecord = { direction?: ConversionDirection; romanNumber?: string; intNumber?: number; };
roman-utils/
├── req/
│ ├── IntToRoman.ts
│ └── RomanToInt.ts
├── RomanUtils.ts
No external runtime dependencies.
MIT License. See LICENSE for details.
Made with ❤️ by @pSkywalker
FAQs
Package for parsing ints to roman digit and roman digits to ints
We found that roman-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.