lib/mehegan.js
function (numeral, quality) {
  // Roman numeral representing chord
  this.numeral = numeral;

  // Chord quality: M, m, x, o, ø, s
  this.quality = quality;
  if (!_.contains(['M', 'm', 'x', 'o', 'ø', 's'], quality)) {
    throw new Error('Invalid chord quality');
  }

  // The number of half-steps between the key and the chord
  // e.g. I => 0, bIV => 6
  this.interval = getHalfSteps(numeral);

  this.toString = function () {
    return this.numeral + this.quality;
  };
}
function (numeral, quality) {
  // Roman numeral representing chord
  this.numeral = numeral;

  // Chord quality: M, m, x, o, ø, s
  this.quality = quality;
  if (!_.contains(['M', 'm', 'x', 'o', 'ø', 's'], quality)) {
    throw new Error('Invalid chord quality');
  }

  // The number of half-steps between the key and the chord
  // e.g. I => 0, bIV => 6
  this.interval = getHalfSteps(numeral);

  this.toString = function () {
    return this.numeral + this.quality;
  };
}
function ( numeral , quality ) { // Roman numeral representing chord this . numeral = numeral ; // Chord quality: M, m, x, o, ø, s this . quality = quality ; if ( ! _ . contains ( [ 'M' , 'm' , 'x' , 'o' , 'ø', s'] , uality) ) throw new Error ( 'Invalid chord quality' ) ; } // The number of half-steps between the key and the chord // e.g. I => 0, bIV => 6 this . interval = getHalfSteps ( numeral ) ; this . toString = function ( ) { return this . numeral + this . quality ; } ; }
A roman numeral symbol representing a chord using the Mehegan system
A roman numeral symbol representing a chord using the Mehegan system