0.2.6 • Published 8 years ago

roman-numeral v0.2.6

Weekly downloads
561
License
MIT
Repository
github
Last release
8 years ago

Roman Numeral

Simple number to roman numeral converter. Works in both Node and browser environments. Zero external dependencies.

Installation

To install:

npm install --save roman-numeral

Getting Started

To use:

require('roman-numeral').convert(2016); // >> "MMXVI"

Default Conversion Mapping:

{
  "M": 1000 ,
  "CM": 900,
  "D": 500,
  "C": 100,
  "LX": 60,
  "L": 50,
  "XL": 40,
  "X": 10,
  "IX": 9,
  "V": 5,
  "IV": 4,
  "I": 1 
}

Override default by calling romanNumeral.convert with optional mapping argument:

var custom = {
  "Y": 2015,
  "O": 1
};

require("roman-numeral").convert(2016, custom); // >> "YO"

License

MIT

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago