Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function (chord) {
var g = G.harmonizer(chord, false)
var steps = g.map(function (i) { return i ? i.charAt(0) : i })
if (steps[0] !== '1' || steps[2] !== '5') return null
if (g[1] === '3M') {
if (g[2] === '5A') return 'aug'
else return g[3] === '7m' ? '7' : 'M'
} else if (g[1] === '3m') {
return g[2] === '5P' ? 'm' : 'dim'
} else if (g[1] === '4P') {
return 'sus4'
}
}