Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function parseRomanChord(str) {
var m = ROMAN.exec(str);
if (!m) return null;
var num = NUM[m[2].toLowerCase()];
var alt = m[1].length;
if (m[1][0] === 'b') alt = -alt;
return { root: tonalPitches.encode(num, alt, 0, 1), name: m[3] };
}
function parseRomanChord (str) {
var m = ROMAN.exec(str)
if (!m) return null
var num = NUM[m[2].toLowerCase()]
var alt = m[1].length
if (m[1][0] === 'b') alt = -alt
return { root: encode(num, alt, 0, 1), name: m[3] }
}