Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function build (tonic, mode) {
if (!isStr(mode)) return null
var m = mode.trim().toLowerCase()
if (!isModeStr(m)) return null
var t = pc(tonic) || false
var n = t ? t + ' ' + m : null
return { name: n, tonic: t, mode: m }
}
function build(tonic, mode) {
if (!tonalPitches.isStr(mode)) return null;
var m = mode.trim().toLowerCase();
if (!isModeStr(m)) return null;
var t = tonalNotes.pc(tonic) || false;
var n = t ? t + ' ' + m : null;
return { name: n, tonic: t, mode: m };
}