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

switch to Array.from rather than spread operator #27

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

jameshartig
Copy link
Contributor

The spread operator requires babel to include a lot of extra code: https://babeljs.io/docs/assumptions#iterableisarray

Similarly with TypeScript: microsoft/TypeScript#8856 (Fixed in microsoft/TypeScript#31166).

Array.from is simpler and reduces the amount of code generated when transpiling. This would save us 811 bytes after gzip.

@iabmayank iabmayank merged commit 2c75bde into IABTechLab:master Sep 6, 2023
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

Successfully merging this pull request may close these issues.

3 participants