getter doesn't work with non alphanumeric keys
csantos1113 opened this issue · comments
Cesar S commented
You know we can have objects with keys with more than alphanumeric characters, like:
const externalIdentifier: 'FE43-D880-21AE';
const data = {
[externalIdentifier]: true
};
When we use the getter
to access that id, it throws an error exception:
const getFn = getter(externalIdentifier);
console.log(getFn(data);
Error:
Uncaught ReferenceError: D880 is not defined
at eval (eval at getter (:26:43), :3:16)
at :1:1
Jason Quense commented
care to send a PR?
Cory Deppen commented