INNER CODE UNIT · TypeScript
romans
scribbletune/scribbletune · src/cli.ts:76
const romans = progDigits.split('').map(digit => {
const idx = Number(digit) - 1;
if (idx < 0 || idx >= chordDegrees.length) {
throw new TypeError(
`Invalid progression digit "${digit}" in "${progDigits}"`
);
}
return chordDegrees[idx];
});
return { chordDegrees: romans.join(' '), raw: progDigits };
};
const parseProgression = (
root: string,
mode: string,
progressionInput: string
): string => {