RE: problems with duplication — indeed! It’s a pretty easy problem to solve, but you lose the simplicity of working with simple strings.
The solution would be to use a random ID generator like node-uuid. Instead of working with strings, you’d work with objects:
Then, you’d use the `id` for the key, and the `value` for display.