Skip to content

Add a note about spread operator limitations - #661

Closed
lpinca wants to merge 1 commit into
masterfrom
gh-653
Closed

Add a note about spread operator limitations#661
lpinca wants to merge 1 commit into
masterfrom
gh-653

Conversation

@lpinca

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@MylesBorins

Copy link
Copy Markdown
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

lpinca commented Apr 18, 2016

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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

@MylesBorins

Copy link
Copy Markdown
Contributor

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

@lpinca

Copy link
Copy Markdown
MemberAuthor

Whoever reads site contents, reads master afaik.

@MylesBorins

Copy link
Copy Markdown
Contributor

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

@lpinca

lpinca commented Apr 18, 2016

Copy link
Copy Markdown
MemberAuthor

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

@MylesBorins

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

No problem :)

@lpinca

lpinca commented Apr 18, 2016

Copy link
Copy Markdown
MemberAuthor

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.

@lpincalpinca changed the title Add a note about spread operator limitations on Node 5.xSpecify that the spread operator only works on iterablesApr 18, 2016
@lpincalpinca changed the title Specify that the spread operator only works on iterablesAdd a note about spread operator limitationsApr 18, 2016
@fhemberger

Copy link
Copy Markdown
Contributor

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

Sign up for freeto 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

@lpinca@MylesBorins@fhemberger