0.1.0 • Published 1 year ago

romanize-numbers v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Romanize-Numbers

npm version Build Status License

Convert Arabic numerals into their Roman numeral equivalents.

Installation

To install the Romanize-Numbers library, use the following command: npm install romanize-numbers

Usage

To use the Romanize-Numbers library in your project, you can import it as follows:

const { numberToRoman } = require("romanize-numbers");

You can then use the romanize function to convert Arabic numerals into their Roman numeral equivalents:

const romanNumeral = numberToRoman("big", 123);
console.log(romanNumeral); // "CXXIII"

API

romanize(number) Converts an Arabic numeral into its Roman numeral equivalent.

Arguments number (required): The Arabic numeral to convert. Returns The Roman numeral equivalent of the input number as a string.

Examples

const { numberToRoman } = require("romanize-numbers");

console.log(numberToRoman("small", 1)); // "i"
console.log(numberToRoman("small", 4)); // "iv"
console.log(numberToRoman("big", 9)); // "IX"
console.log(numberToRoman("big", 42)); // "XLII"
console.log(romanumberToRomannize("big", 3999)); // "MMMCMXCIX"

License

Romanize-Numbers is licensed under the MIT License. See the LICENSE file for more information.

0.1.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago