Nonlinear Performance Magnification
    Wondering what’s next for npm?Check out our public roadmap! »

    romans
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/romans package

    1.0.2 • Public • Published

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

    Build Status codecov dependencies

    forthebadge

    Install

    With npm installed, run:

    $ npm i --save 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

    npm test
    

    License

    MIT

    Install

    npm i romans

    DownloadsWeekly Downloads

    19

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    138 kB

    Total Files

    16

    Last publish

    Collaborators

    • avatar