lib/index-maker.js
function (num, uppercase) {
        var	digits = String(+num).split(""),
        key = ["","c","cc","ccc","cd","d","dc","dcc","dccc","cm",
        "","x","xx","xxx","xl","l","lx","lxx","lxxx","xc",
        "","i","ii","iii","iv","v","vi","vii","viii","ix"],
        roman = "",
        i = 3;
        while (i--)
            roman = (key[+digits.pop() + (i * 10)] || "") + roman;

        var index = Array(+digits.join("") + 1).join("m") + roman;
        return uppercase ? index.toUpperCase() : index;
    }
function (num, uppercase) {
        var	digits = String(+num).split(""),
        key = ["","c","cc","ccc","cd","d","dc","dcc","dccc","cm",
        "","x","xx","xxx","xl","l","lx","lxx","lxxx","xc",
        "","i","ii","iii","iv","v","vi","vii","viii","ix"],
        roman = "",
        i = 3;
        while (i--)
            roman = (key[+digits.pop() + (i * 10)] || "") + roman;

        var index = Array(+digits.join("") + 1).join("m") + roman;
        return uppercase ? index.toUpperCase() : index;
    }
function ( num , uppercase ) { var digits = String ( + num ) . split ( "" ) , key = [ "" , "c" , "cc" , "ccc" , "cd" , "d" , "dc" , "dcc" , "dccc" , "cm" , "" , "x" , "xx" , "xxx" , "xl" , "l" , "lx" , "lxx" , "lxxx" , "xc" , "" , "i" , "ii" , "iii" , "iv" , "v" , "vi" , "vii" , "viii" , "ix" ] , roman = "" , i = 3 ; while ( i -- ) roman = ( key [ + digits . pop ( ) + ( i * 10 ) ] || "" ) + roman ; var index = Array ( + digits . join ( "" ) + 1 ) . join ( "m" ) + roman ; return uppercase ? index . toUpperCase ( ) : index ; }
JavaScript Roman Numeral Converter (Thanks to Steven Levithan @slevithan) http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter
JavaScript Roman Numeral Converter ( Thanks to Steven Levithan