1.0.2 • Published 4 years ago

@finn-vgtl/romanize v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Romanize

Test and Release NPM Version MIT License semantic-release

Validate and convert roman numbers to and from arabic.

Install via npm

npm i @finn-vgtl/romanize

Usage

import { isRoman, romanize, deromanize } from '@finn-vgtl/romanize'
// or
const romanize = require('@finn-vgtl/romanize')

// validate roman numbers
isRoman('MMXXI') // true
isRoman('ABC')   // false

// romanize arabic numbers
romanize(123) // "CXXIII"

// deromanize roman numbers
deromanize("CXXIII") // 123
1.0.2

4 years ago

1.0.1

4 years ago