romanum

1.0.1 • Public • Published

Were you born in the wrong century?

Have you ever wondered how the romans coded?

Do you long for the days of watching two gladiators duke it out in the sand floor of the arena?

Well then RomaNum is the right library for you!

It does conversions!

var romanum = require('romanum')
 
console.log(romanum.toNumeral(100)) // 'C'
 
console.log(romanum.toNumber('CLIX')) // 159

It does addition!

var romanum = require('romanum')
 
console.log(romanum.plus('X', 'V', 'L')) // 'LXV'
 
console.log(romanum.plus('X', 'VI', 'III')) // 'XIX'

Subtraction!

var romanum = require('romanum')
 
console.log(romanum.subtract('L', 'IX')) // 'XLI'
 
console.log(romanum.subtract('C', 'XX', 'IV', 'III')) // 'LXXIII'

even Multiplication and Division!

var romanum = require('romanum')
 
console.log(romanum.multiply('II', 'V')) // 'X'
 
console.log(romanum.multiply('IV', 'V', 'V')) // 'C'
 
console.log(romanum.divide('C', 'XX')) // 'V'
 
console.log(romanum.divide('L', 'V', 'V')) // 'II'

So, if you dream of racing your chariot under the aqueducts of acient Rome, pick up Romanum today and fullfill your dreams!

disclaimer: Romanum makes no claim to allowing you to do any of the above, besides performing mathematical operations with roman numerals. All other activities are purely fantasy, and should not be attempted, unless you are a skilled swordsman or have experience driving a team of horses

Package Sidebar

Install

npm i romanum

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

15.6 kB

Total Files

6

Last publish

Collaborators

  • holtalanm