Just a nit. I was thinking
`key = modifier ? modifier + '-' + key : key;`
`key = isSymbol(key) ? "'" + key + "'" : key;`

or `if/else`.

Nested ternary operators are hard to read.