[go: up one dir, main page]

Skip to content
forked from qbunt/romans

A small, simple library for converting arabic decimals to roman numerals and back again

License

Notifications You must be signed in to change notification settings

indavidjool/romans

 
 

Repository files navigation

A no dependency, simple lib for converting from decimal notation to roman numerals and back again

quality tests coverage deps npm

forthebadge

Install

With yarn installed, run:

$ yarn add romans

Usage

var roman = require('romans');
roman.romanize(454);
// returns:"CDLIV"

roman.deromanize("CDLIV")
//returns: 454

roman.allNumerals
// property containing [ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 ]

roman.allChars
// property containing all roman numeral characters
// [ 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I' ]

Testing

$ yarn test

License

MIT

About

A small, simple library for converting arabic decimals to roman numerals and back again

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%