JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5825
  • Score
    100M100P100Q123410F
  • License MIT

A small, no-dependency lib for converting to and from roman numerals

Package Exports

  • romans

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (romans) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Codacy Badge Build Status Node.js CI 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