-
Notifications
You must be signed in to change notification settings - Fork 108
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
%IntlSegmentsPrototype%.values()
#945
Comments
So the decrease in verbosity would be six characters, and only when using Iterator prototype methods rather than e.g. - Iterator.from(segments).filter(x => x.isWordLike).map(x => x.segment).toArray()
+ segments.values().filter(x => x.isWordLike).map(x => x.segment).toArray() I'm not opposed, but I'm also not particularly motivated to pursue this. |
I think of this as less motivated by decrease in verbosity and more by consistency with the rest of the language/platform. Almost every other iterable already has a string-named alias for its |
|
Use case
Example where
Intl.Segmenter
is a bit verbose:Solution
Add a method (e.g.) called
.values()
to%IntlSegmentsPrototype%
that returnsthis[Symbol.iterator]()
.Almost all other built-in iterables have string-keyed methods that return iterators, so this addition would bring
%IntlSegmentsPrototype%
into the fold.The text was updated successfully, but these errors were encountered: