function toRomanNumerals(number, lowerCase = false) {
  assert(
    Number.isInteger(number) && number > 0,
    "The number should be a positive integer."
  );

  const roman =
    "M".repeat((number / 1000) | 0) +
    ROMAN_NUMBER_MAP[((number % 1000) / 100) | 0] +
    ROMAN_NUMBER_MAP[10 + (((number % 100) / 10) | 0)] +
    ROMAN_NUMBER_MAP[20 + (number % 10)];
  return lowerCase ? roman.toLowerCase() : roman;
}
Converts positive integers to (upper case) Roman numerals.
@param {number} number - The number that should be converted.
@param {boolean} lowerCase - Indicates if the result should be converted
  to lower case letters. The default value is `false`.
@returns {string} The resulting Roman number.