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

Using symbol for isLong #97

Open
srknzl opened this issue Mar 21, 2021 · 2 comments
Open

Using symbol for isLong #97

srknzl opened this issue Mar 21, 2021 · 2 comments
Labels

Comments

@srknzl
Copy link

srknzl commented Mar 21, 2021

It might be better to use javascript's symbols to validate if an object is long. By using a symbol, we can guarantee that the property indicating if an object is long cannot be accessed(since every symbol is unique).

@dcodeIO
Copy link
Owner

dcodeIO commented Oct 28, 2021

Makes me wonder how Object.getOwnPropertySymbols changes the equation.

@dcodeIO dcodeIO added the unsure label Oct 28, 2021
@srknzl
Copy link
Author

srknzl commented Oct 28, 2021

Might be possible, but It is much harder to modify a symbol key.

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

No branches or pull requests

2 participants