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

Ergonomics: contributeToHistogram could accept an array of contributions #70

Open
yoavweiss opened this issue Jun 21, 2023 · 1 comment
Labels
compat Issue may affect web compatibility enhancement New feature or request

Comments

@yoavweiss
Copy link
Contributor

Continuing the discussion from #44

@alexmturner
Copy link
Collaborator

When making this change, we will need to consider how developers will be able to feature detect this and support versions both with and without this change.

As this is purely syntactic sugar, developers could always just pass each contribution individually to the function and that may be the easiest way to support both versions (although this does defeat the purpose of the change a little). It would also be possible to try/catch a TypeError when passing an array.

If we want to make feature detection simpler, we could consider a different name for this function that takes an array, e.g. contributeArrayToHistogram().

@alexmturner alexmturner added enhancement New feature or request compat Issue may affect web compatibility labels Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Issue may affect web compatibility enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants