symbolizeKeys
Creates a new object, converting each key to a Symbol.
- Use
Object.keys()to get the keys ofobj. - Use
Array.prototype.reduce()andSymbol()to create a new object where each key is converted to aSymbol.
Creates a new object, converting each key to a Symbol.
Object.keys() to get the keys of obj.Array.prototype.reduce() and Symbol() to create a new object where each key is converted to a Symbol.