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

fix: allow spreading of strings within arrays #177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcfranco
Copy link

@jcfranco jcfranco commented May 17, 2022

Fixes #175

This restores array spreading for the following use case:

[..."foo"]; // ['f', 'o', 'o']

@rbuckton @DanielRosenwasser @weswigham First time contributing to this project, so please let me know if there's something I missed.

@ghost
Copy link

ghost commented May 17, 2022

CLA assistant check
All CLA requirements met.

@driskull
Copy link

driskull commented Jun 7, 2022

This would be nice! :)

@jcfranco
Copy link
Author

jcfranco commented Jul 7, 2022

friendly ping 😁

@rbuckton
Copy link
Member

rbuckton commented May 2, 2023

A simpler change might be if (ar || !(i in Object(from))) { to coerce the string to an object for use with in. We'd also need to make this change in TypeScript before we take it for tslib, however.

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.

TypeError when spreadArray is used on a string containing an emoji/Unicode character
3 participants