docs: function (chord) {
    var intervals = [];
  
    // Assume P1, M3. and P5
    intervals[1] = 'P';
    intervals[3] = 'M';
    intervals[5] = 'P';
  
    // Chords with m3
    if ((/^(m|dim|ø)/).test(chord)) {
      intervals[3] = 'm';  
    }
    // Chords with dim5
    if ((/(dim|ø|[-b]5)/).test(chord)) {
      intervals[5] = 'dim';  
    }
    // Chords with aug5
    if ((/^(aug|\+)/).test(chord) || (/[+#]5/).test(chord)) {
      intervals[5] = 'aug';  
    }
    // Chord with no 5th
    if ((/no5/).test(chord)) {
      intervals[5] = '';
    }
    // Chords with no 3rd
    else if ((/^[5n]/).test(chord) || (/no3/).test(chord)) {
      intervals[3] = '';
    }
    // Chords with m7
    if ((/(ø|7|9|11|13)/).test(chord)) {
      intervals[7] = 'm';  
    }
    // Chords with M7
    if ((/(M7|M9|M11|M13)/).test(chord)) {
      intervals[7] = 'M';
    }
    // Chords with dim7
    if ((/(dim7|dim9|dim11|dim13)/).test(chord)) {
      intervals[7] = 'dim';
    }
    // 6ths
    if ((/6/).test(chord)) {
      intervals[6] = 'M';
      intervals[7] = '';
    }
    // Suspended 2
    if ((/sus2/).test(chord)) {
      intervals[2] = 'M';
      intervals[3] = '';
    }
    // Suspended 4
    else if ((/sus/).test(chord)) {
      intervals[4] = 'P';
      intervals[3] = '';
    }
    // 9ths
    if ((/9/).test(chord)) {
      intervals[9] = 'M';  
    }
    if ((/[+#]9/).test(chord)) {
      intervals[9] = '';  
      intervals[10] = 'm'; // Store #9 as b10 to allow for b9#9
    }
    if ((/[-b]9/).test(chord)) {
      intervals[9] = 'm';  
    }
    if ((/add9/).test(chord)) {
      if (!(/7/).test(chord)) intervals[7] = '';
    }
    // 11ths
    if ((/[+#]11/).test(chord)) {
      intervals[11] = 'aug';  
    }
    else if ((/[-b]11/).test(chord)) {
      intervals[11] = 'dim';  
    }
    else if ((/add11/).test(chord) || (/\([^\)]*11[^\)]*\)/).test(chord)) {
      intervals[11] = 'P';
      if ((/add11/).test(chord) && !(/7|9/).test(chord)) {
        intervals[7] = '';
      }
    }
    else if ((/11/).test(chord)) {
      intervals[11] = 'P';
      intervals[9] = intervals[9] || 'M';  
    }
    // 13ths
    if ((/[-b]13/).test(chord)) {
      intervals[13] = 'm';  
    }
    else if ((/add13/).test(chord) || (/\([^\)]*13[^\)]*\)/).test(chord)) {
      intervals[13] = 'M';
      if ((/add13/).test(chord) && !(/7|9|11/).test(chord)) {
        intervals[7] = '';
      }
    }
    else if ((/13/).test(chord)) {
      intervals[13] = 'M';
      intervals[11] = intervals[11] || 'P';
      intervals[9] = intervals[9] || 'M';
    }
    // Exclude 9th or 11th
    if ((/no9/).test(chord)) {
      intervals[9] = '';
    }
    // Exclude 9th or 11th
    if ((/no11/).test(chord)) {
      intervals[11] = '';
    }
  
    return intervals;
  }