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

Add a note about spread operator limitations #661

Closed
wants to merge 1 commit into from
Closed

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Apr 18, 2016

This improves the existing note about the spread operator specifying that it only works with array literals and function calls on Node 5.x.

Closes #653.

@MylesBorins
Copy link
Contributor

Should the language be explicit about node 6.x having greater support for the spear operator?

@MylesBorins
Copy link
Contributor

Actually... in thinking about it more the only way this change makes sense will be if we update the information regarding the spread operator at the end of the month when we bump to 6, as 5 will no longer be receiving support

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

Yeah, was thinking the same. I mean we can update it when node 6 will be released with something like:
"spread operator works on array literals, function calls and destructuring".

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

Or just wait for node 6 and use a sentence similar to the above one directly.

@MylesBorins
Copy link
Contributor

You could send this PR directly to 5.x and send the other to master.

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

Whoever reads site contents, reads master afaik.

@MylesBorins
Copy link
Contributor

the generated docs for v5 will be made from that branch's doc folder though

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

@thealphanerd Are you suggesting to move this pr to node repo? Otherwise I don't get it.

@MylesBorins
Copy link
Contributor

@lpinca OH darn... this is what I get for responding via email when I am not fully awake yet.

I thought this was against the node repo. Sorry for the confusion

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

No problem :)

@lpinca
Copy link
Member Author

lpinca commented Apr 18, 2016

I've updated the pr, but it's probably better to close it.
The issue it tries to solve (#653) is probably invalid because the author used the spread operator on a non-iterable object tried to use object spread.
I don't see a real value in adding this note. This info should be (and actually is) in the operator documentation, not here.

@lpinca lpinca changed the title Add a note about spread operator limitations on Node 5.x Specify that the spread operator only works on iterables Apr 18, 2016
@lpinca lpinca changed the title Specify that the spread operator only works on iterables Add a note about spread operator limitations Apr 18, 2016
@fhemberger
Copy link
Contributor

Ok, closing this now. Feel free to reopen this PR if required.

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