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

Missing IDictionary.key and IDictionary.values #95

Open
shtse8 opened this issue Jun 24, 2022 · 0 comments
Open

Missing IDictionary.key and IDictionary.values #95

shtse8 opened this issue Jun 24, 2022 · 0 comments

Comments

@shtse8
Copy link

shtse8 commented Jun 24, 2022

IDictionary saves my life while js object doesn't support non-string key.
it works well but it seems missing IDictionary.key and IDictionary.values.
I only can get the keys or values from enumerable.

dictionary.toEnumerable().select(x => x.key).toArray() // dictionary.keys
dictionary.toEnumerable().select(x => x.value).toArray() // dictionary.values

the drawback is I can't get the underlining array object and need to do O(n) on each get.

I hope it can add support of getting keys and values like C#.
https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary.keys
https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary.values

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

1 participant