Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol properties are ignored #16

Closed
natesilva opened this issue Mar 13, 2020 · 2 comments
Closed

Symbol properties are ignored #16

natesilva opened this issue Mar 13, 2020 · 2 comments

Comments

@natesilva
Copy link

Symbols can be used as property keys, but they are ignored.

const klona = require('klona');

const mySymbol = Symbol('mySymbol');

const x = { value: 42, [mySymbol]: 'hello' };

console.log(x);
// { value: 42, [Symbol(mySymbol)]: 'hello' }

const y = klona(x);
console.log(y);
// { value: 42 }
// expected: { value: 42, [Symbol(mySymbol)]: 'hello' }
@lukeed
Copy link
Owner

lukeed commented Mar 13, 2020

Hey,

Symbols will be included in the upcoming klona/full mode, as mentioned here

@natesilva
Copy link
Author

That’s great. Thanks! I searched for “symbol” in this repo and didn’t find it but I see it’s mentioned on https://twitter.com/WebReflection/status/1215546579924504577

Duplicate of #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants