Package Exports
- romans
- romans/romans.js
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 library for converting from decimal notation to roman 🏛 numerals and back again.
Install
With npm, pnpm, or yarn installed, run:
$ yarn add romansUsage
const romans = require('romans');
romans.romanize(454)
// returns: 'CDLIV'
romans.deromanize('CDLIV')
// returns: 454
romans.allNumerals
// array containing the numeric equivalents of the roman characters
// [ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 ]
romans.allChars
// array containing all roman numeral characters
// [ 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I' ]
Testing
Test coverage is reported via codecov, and run on every release
$ yarn testLicense
Contributions
If you'd like to contribute to this library, please send a PR or file a new issue. I aim to get PRs accepted in short order should they align with the goals. Also, be nice.
